Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support role="heading", aria-level #36

Closed
jonathantneal opened this issue Mar 10, 2017 · 1 comment
Closed

Support role="heading", aria-level #36

jonathantneal opened this issue Mar 10, 2017 · 1 comment

Comments

@jonathantneal
Copy link

jonathantneal commented Mar 10, 2017

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.

See:

Pages attempting to generate a valid document outline using the techniques outlined in these posts attributes are not currently captured by this plugin.

@dominykas
Copy link
Member

dominykas commented Mar 13, 2017

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants