Skip to content

[html-aam] Set heading level based on HTML computed heading level#2720

Open
keithamus wants to merge 3 commits intomainfrom
headingoffset
Open

[html-aam] Set heading level based on HTML computed heading level#2720
keithamus wants to merge 3 commits intomainfrom
headingoffset

Conversation

@keithamus
Copy link
Member

@keithamus keithamus commented Jan 22, 2026

🚀 Netlify Preview:
🔄 this PR updates the following sspecs:

Refs whatwg/html#11086.

This wires up HTML-AAM to the headingoffset feature 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)

@netlify
Copy link

netlify bot commented Jan 22, 2026

Deploy Preview for wai-aria ready!

Name Link
🔨 Latest commit 15b584a
🔍 Latest deploy log https://app.netlify.com/projects/wai-aria/deploys/697b90d954b04100083038ed
😎 Deploy Preview https://deploy-preview-2720--wai-aria.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

🚀 Deployed on https://deploy-preview-2720--wai-aria.netlify.app

@github-actions github-actions bot temporarily deployed to pull request January 22, 2026 10:33 Inactive
@scottaohara scottaohara self-assigned this Jan 22, 2026
Copy link
Member

@scottaohara scottaohara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Co-authored-by: Scott O'Hara <scottaohara@users.noreply.github.com>
@github-actions github-actions bot temporarily deployed to pull request January 26, 2026 18:24 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 29, 2026 16:56 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants