[html-aam] Set heading level based on HTML computed heading level#2720
[html-aam] Set heading level based on HTML computed heading level#2720keithamus wants to merge 3 commits into
Conversation
✅ Deploy Preview for wai-aria ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
🚀 Deployed on https://deploy-preview-2720--wai-aria.netlify.app |
scottaohara
left a comment
There was a problem hiding this comment.
just some minor things / question about if the note should be normative
| <a class="core-mapping" href="#role-map-heading">`heading`</a> role, with the <a class="core-mapping" href="#ariaLevel">`aria-level`</a> property set to | ||
| <a data-cite="html/sections.html#get-an-element's-computed-heading-offset">the computed heading level</a>; this is the number from the element's tag name (e.g., 2 for `h2`), adjusted | ||
| by any <a href="#att-headingoffset">`headingoffset`</a> or <a href="#att-headingreset">`headingreset`</a> attributes in scope. | ||
| <div class="note"> |
There was a problem hiding this comment.
thinking about this more, i'm wondering if this should be normative?
HTML has one example that mentions aria-level, but not in a way that would demonstrate it taking priority.
There was a problem hiding this comment.
I agree, I don't see any reason why this couldn't be a normative requirement.
| <a class="core-mapping" href="#role-map-heading">`heading`</a> role, with the <a class="core-mapping" href="#ariaLevel">`aria-level`</a> property set to | ||
| <a data-cite="html/sections.html#get-an-element's-computed-heading-offset">the computed heading level</a>; this is the number from the element's tag name (e.g., 2 for `h2`), adjusted | ||
| by any <a href="#att-headingoffset">`headingoffset`</a> or <a href="#att-headingreset">`headingreset`</a> attributes in scope. | ||
| <div class="note"> |
There was a problem hiding this comment.
I agree, I don't see any reason why this couldn't be a normative requirement.
| <a data-cite="html/sections.html#get-an-element's-computed-heading-offset">the computed heading level</a>; this is the number from the element's tag name (e.g., 2 for `h2`), adjusted | ||
| by any <a href="#att-headingoffset">`headingoffset`</a> or <a href="#att-headingreset">`headingreset`</a> attributes in scope. | ||
| <div class="note"> | ||
| If an explicit <a class="core-mapping" href="#ariaLevel">`aria-level`</a> attribute is specified on the element, it takes priority over the implicit `aria-level` value derived from |
There was a problem hiding this comment.
According to the computed heading level algorithm in HTML spec, it caps off at a heading level value of 9: https://html.spec.whatwg.org/multipage/sections.html#heading-levels-&-offsets.
However, core-aam doesn't note a maximum heading level: https://w3c.github.io/core-aam/#ariaLevelHeading. Should this be clarified in html-aam/core-aam?
🚀 Netlify Preview:
🔄 this PR updates the following sspecs:
Refs whatwg/html#11086.
This wires up HTML-AAM to the
headingoffsetfeature of the html spec which defines an algorithm for computing a heading level.Test, Documentation and Implementation tracking
Once this PR has been reviewed and has consensus from the working group, tests should be written and issues should be opened on browsers. Add N/A and check when not applicable.
(Supersedes #2598)