Skip to content

feat(aria-roles): add sectionheader and sectionfooter roles - #5238

Open
chutchins25 wants to merge 2 commits into
developfrom
chut/4734-sectionheader
Open

feat(aria-roles): add sectionheader and sectionfooter roles#5238
chutchins25 wants to merge 2 commits into
developfrom
chut/4734-sectionheader

Conversation

@chutchins25

Copy link
Copy Markdown
Contributor

Adds the new ARIA 1.3 sectionheader and sectionfooter roles to axe-core's standards data.

What & why

Per w3c/aria#1931 (merged into the ARIA spec main), sectionheader and sectionfooter are new concrete structural roles with superclass section. axe-core did not recognize them, so role="sectionheader" / role="sectionfooter" were flagged as invalid roles.

Definitions were grounded directly against the spec source (w3c/aria main):

  • roleInfo.jsparentRoles: ["section"], no required / prohibited / local (non-global) properties.
  • index.html characteristics table — Is Abstract: no (concrete), Name From: author (so no nameFromContent), Accessible Name Required: no.

They are modeled on the existing blockquote precedent (type: 'structure', superclassRole: ['section']).

Note on scope — bundling sectionfooter

The issue (#4734) names only sectionheader, but the spec introduced sectionheader and sectionfooter together and there is no separate sectionfooter issue. 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 → implicit sectionheader / 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-roles integration HTML/JSON — pass cases for both roles.
  • aria-roles virtual-rule — pass cases for both roles.
  • Verified abstractrole / fallbackrole / unsupportedrole / aria-allowed-role check suites still pass.

Closes #4734

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 straker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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);
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These aren't needed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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
straker dismissed their stale review July 27, 2026 19:52

Resolved

@straker
straker marked this pull request as ready for review July 27, 2026 19:53
@straker
straker requested a review from a team as a code owner July 27, 2026 19:53

@Garbee Garbee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Talking about the commit reference internally before merging.

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

Successfully merging this pull request may close these issues.

Add new sectionheader role

3 participants