You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should elements marked up as role="heading" also be supported?
heading (role)
A heading for a section of the page.
Often, heading elements will be referenced with the aria-labelledby attribute of the section for which they serve as a heading. If headings are organized into a logical outline, the aria-level attribute can be used to indicate the nesting level.
— Accessible Rich Internet Applications (WAI-ARIA) 1.0
Authors may use the ARIA role and aria-* attributes on HTML elements, in accordance with the requirements described in the ARIA specifications.
— HTML5 Specificiation
As the document outline was never correctly implemented in browsers, pages are now experimenting with adding their own implementations via a re-assigned aria-level attribute on existing heading elements, or a role attribute on a new element.
Pages attempting to generate a valid document outline using the techniques outlined in these posts attributes are not currently captured by this plugin.
The text was updated successfully, but these errors were encountered:
So far, I've only implemented what's in the HTML5 standard and I think it's a good approach to stick to just that.
If the HTML5 standard changes and defines a new outlining algorithm - I'll update the library. To introduce support for role / aria-level one would need to modify the existing tree walking algorithm and define how the different approaches interplay with each other - I'm afraid I don't have time to do that all by myself. What happens when you mix section, with aria-level and add some h1 - h6 inside and none of them match up? Which takes precedence? When are new implied sections created?
The blog posts are interesting and ask some questions and throw some ideas, but as nothing is set in stone and it's an early discussion - I'm not going to take action myself. Feel free to fork and experiment and PR, though!
Should elements marked up as
role="heading"
also be supported?As the document outline was never correctly implemented in browsers, pages are now experimenting with adding their own implementations via a re-assigned
aria-level
attribute on existing heading elements, or arole
attribute on a new element.See:
Pages attempting to generate a valid document outline using the techniques outlined in these posts attributes are not currently captured by this plugin.
The text was updated successfully, but these errors were encountered: