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

do we need a 'level' attribute? #8

Closed
stevefaulkner opened this issue May 7, 2014 · 2 comments · Fixed by #17
Closed

do we need a 'level' attribute? #8

stevefaulkner opened this issue May 7, 2014 · 2 comments · Fixed by #17

Comments

@stevefaulkner
Copy link
Contributor

thinking that a 'level' attribute that maps to aria-level may be useful. This would not be set in content by browser if natively implemented, but would expose nesting level 1-x to AT in DOM

@matatk
Copy link
Contributor

matatk commented May 7, 2014

What are the use-cases for having a level attribute? If it were to override what the outline algorithm says the level should be, given the nesting, then we've negated the use of our element. If it were to act as a <h1> to <h6> element, then perhaps it would be better to just use those instead?

However, if the idea is to allow this heading element to be the heading element in future, then a level attribute would be a good idea, because people will have to have that option if <h1> to <h6> disappear.

Going with the second option here, it probably makes sense to add a basic level attribute that does no checking (other than ensuring an integer was passed in, assuming we can do that) and pass that directly to the aria-level instead of using nestingLevel() -- does that sound OK?

I think we should also make it clear in the docs that level is not intended to be used, but is there to show how a universal heading element may work in future.

@stevefaulkner
Copy link
Contributor Author

i think we do as it makes the element usable in cases where sectioning content is not used to assign level

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

Successfully merging a pull request may close this issue.

2 participants