Today I found that if you have
<h1>Heading</h1>in your HTML document, Edge (Legacy) will report to Narrator that this is a heading at level two instead of one. The same happens to
h6. This problem reproduces in Microsoft Edge 44.18362.449.0 (EdgeHTML 18.18363) and Narrator for Windows 10, version 1909. Even with the presumption that software these days tends to have poor quality, this comes as a surprise to me. Here, I make a guess why this happens.
Disclaimer. Microsoft Edge logo is a property of Microsoft.
- Install Windows 10, version 1909. Check that the version of Edge is 44.18362.449.0 with EdgeHTML 18.18363.
- Open this page in Edge.
- Launch Narrator and use Caps Lock+Left/Right to navigate the content on that page.
Actual Behaviour Narrator reads the following:
"This is an H1" at level 2. "This is an H2" at level 2. "This is an H3" at level 2. "This is an H4" at level 2. "This is an H5" at level 2. "This is an H6" at level 2. "H3 with explicit aria-level" at level 3. "H4 with explicit aria-level" at level 4. "H5 with explicit aria-level" at level 5. "H6 with explicit aria-level" at level 6.
Expected Behaviour The first 6 items should be read as follows:
"This is an H1" at level 1. "This is an H2" at level 2. "This is an H3" at level 3. "This is an H4" at level 4. "This is an H5" at level 5. "This is an H6" at level 6.
Redundantly setting the
aria-level attribute of the heading tags will make Edge report the correct heading levels.
The standard says that the default value of
aria-level for a tag with heading role is 2. This rule is introduced on 3 July 2015 and published on 14 July 2015.
My guess is that the programmer blindly applied this rule to all tags.
Indeed, if you use the accessibility inspector of Microsoft Edge Legacy, you will see that the Role and the Level of the tags without explicit
aria-level are blank.
It is the responsibility of the user agent to report the correct role and level to Accessibility interface. (This is a bug of Edge, not Narrator.)
Of course, any reasonable person believes the default
h1 should be one, not two.
Indeed, the rules for
h6 are overridden by this table.
I am citing two versions, one before and the other after 14 July 2015, to indicate that this overriding has always held and should continue to hold.
It is also way before September 2019, and there is no excuse of not implementing it correctly.