php-src/ext/standard/tests/general_functions/phpinfo-header-anchors.phpt
Ayesh Karunaratne 5c2c688c17
phpinfo HTML Output: Make module title names clickable and link to the URL fragment
Each section of `phpinfo` is titled with an `<h2><a name="module_NAME">NAME</a></h2>` tag. While the `name=module_NAME` attribute allows linking to that section using a URL fragment (e.g `info.php#module_NAME`), it lacks discoverability because the `<a>` tag does not contain an `href` attribute. This is also highlighted in accessibility scans (in Firefox for instance).

This adds a link to the `<a>` tag that links to the URL fragment, fixing the accessibility remark and improving the discoverability of the clickable section titles. Also contains minor CSS changes to account for the dark theme CSS.

Closes GH-9054.
2022-07-20 17:18:34 +02:00

11 lines
161 B
PHP

--TEST--
phpinfo() with clickable anchor tags
--CGI--
--FILE--
<?php
phpinfo();
?>
--EXPECTF--
%a
<h2><a name="module_core" href="#module_core">Core</a></h2>
%a