feat(aria-roles): add sectionheader and sectionfooter roles - #5238
Open
chutchins25 wants to merge 2 commits into
Open
feat(aria-roles): add sectionheader and sectionfooter roles#5238chutchins25 wants to merge 2 commits into
chutchins25 wants to merge 2 commits into
Conversation
Adds the ARIA 1.3 sectionheader and sectionfooter roles (w3c/aria#1931) as concrete structural roles with superclass section. Closes #4734 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
straker
previously requested changes
Jul 23, 2026
straker
left a comment
Contributor
There was a problem hiding this comment.
Looks good, just the one thing below.
Comment on lines
+76
to
+101
|
|
||
| it('should pass for the sectionheader role', () => { | ||
| const results = axe.runVirtualRule('aria-roles', { | ||
| nodeName: 'div', | ||
| attributes: { | ||
| role: 'sectionheader' | ||
| } | ||
| }); | ||
|
|
||
| assert.lengthOf(results.passes, 1); | ||
| assert.lengthOf(results.violations, 0); | ||
| assert.lengthOf(results.incomplete, 0); | ||
| }); | ||
|
|
||
| it('should pass for the sectionfooter role', () => { | ||
| const results = axe.runVirtualRule('aria-roles', { | ||
| nodeName: 'div', | ||
| attributes: { | ||
| role: 'sectionfooter' | ||
| } | ||
| }); | ||
|
|
||
| assert.lengthOf(results.passes, 1); | ||
| assert.lengthOf(results.violations, 0); | ||
| assert.lengthOf(results.incomplete, 0); | ||
| }); |
Contributor
Author
There was a problem hiding this comment.
Removed — role validity is already covered by the aria-roles integration tests.
…-rule cases Address review feedback: role validity is already covered by the aria-roles integration tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
straker
approved these changes
Jul 27, 2026
Garbee
requested changes
Jul 28, 2026
Garbee
left a comment
Member
There was a problem hiding this comment.
Talking about the commit reference internally before merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the new ARIA 1.3
sectionheaderandsectionfooterroles to axe-core's standards data.What & why
Per w3c/aria#1931 (merged into the ARIA spec
main),sectionheaderandsectionfooterare new concrete structural roles with superclasssection. axe-core did not recognize them, sorole="sectionheader"/role="sectionfooter"were flagged as invalid roles.Definitions were grounded directly against the spec source (
w3c/ariamain):roleInfo.js—parentRoles: ["section"], no required / prohibited / local (non-global) properties.index.htmlcharacteristics table — Is Abstract: no (concrete), Name From: author (so nonameFromContent), Accessible Name Required: no.They are modeled on the existing
blockquoteprecedent (type: 'structure', superclassRole: ['section']).Note on scope — bundling
sectionfooterThe issue (#4734) names only
sectionheader, but the spec introducedsectionheaderandsectionfootertogether and there is no separatesectionfooterissue. They are bundled here as one cohesive "ARIA 1.3 section header/footer roles" change.Out of scope / follow-up
The updated HTML-AAM implicit-role mapping (
<header>/<footer>scoped inside sectioning content → implicitsectionheader/sectionfooter) is not included here — it has a much larger blast radius (landmark/region computations,aria-allowed-role) and will be tracked as a separate issue.Tests
aria-rolesintegration HTML/JSON — pass cases for both roles.aria-rolesvirtual-rule — pass cases for both roles.abstractrole/fallbackrole/unsupportedrole/aria-allowed-rolecheck suites still pass.Closes #4734