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

Default level of h1-h6 and nested sectioning #268

Closed
Jym77 opened this issue Nov 27, 2019 · 2 comments
Closed

Default level of h1-h6 and nested sectioning #268

Jym77 opened this issue Nov 27, 2019 · 2 comments

Comments

@Jym77
Copy link

Jym77 commented Nov 27, 2019

As per https://w3c.github.io/html-aam/#el-h1-h6 the default level of h1-h6 elements is the number in the tag. This does not correspond to the outline algorithm of HTML (which, in very short, says that a h1 inside a section is actually a h2).

As far as I can see, there was a voluntary change to the current version almost 2 years ago in #116, backed notably by the fact that browsers were doing the same.

From my recent quick tests, it looks that both Chrome, Edge and Firefox are rendering nested headings according to the outline algorithm (eg a <section><h1>Foo</h1></section> and a <h2>Foo</h2> are rendered exactly in the same way). So it seems that now browsers are implementing the outline algorithm correctly. This leads to inconsistencies between rendered content and outline exposed by assistive technologies.

Is it time to roll back on that change and have a default level set to the outline depth?

@stevefaulkner
Copy link
Contributor

@Jym77 Hi, the outline algorithm has never been implemented in any browser apart from a subset of the styling. As a result the outline is in the process of being replaced with something that will hopefully be implemented by browsers, see discussion and PR whatwg/html#3499 there is further background explanation and discussion references here: https://www.w3.org/wiki/HTML/Usage/Headings/h1only

@Jym77
Copy link
Author

Jym77 commented Nov 27, 2019

Thanks for the answer and the links 😄

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