Skip to content

refactor(template-no-abstract-roles): source abstract-role list from aria-query#2721

Merged
NullVoxPopuli merged 1 commit into
ember-cli:masterfrom
johanrd:refactor/abstract-roles-from-aria-query
Apr 21, 2026
Merged

refactor(template-no-abstract-roles): source abstract-role list from aria-query#2721
NullVoxPopuli merged 1 commit into
ember-cli:masterfrom
johanrd:refactor/abstract-roles-from-aria-query

Conversation

@johanrd
Copy link
Copy Markdown
Contributor

@johanrd johanrd commented Apr 21, 2026

This PR is part of a broader a11y parity audit comparing our rules against jsx-a11y, vue-a11y, angular-eslint-template, and lit-a11y.

Replaces the hand-maintained list of 12 abstract ARIA roles with a derivation from aria-query:

const { roles } = require('aria-query');
const PROHIBITED_ROLE_VALUES = new Set(
  [...roles.keys()].filter((role) => roles.get(role).abstract)
);

aria-query is already a dependency (used by several other rules). Future WAI-ARIA additions of abstract roles flow in automatically on aria-query upgrade instead of requiring a hand edit here.

Before/after

Hand list (12 roles): command, composite, input, landmark, range, roletype, section, sectionhead, select, structure, widget, window.

aria-query's roles.keys().filter(r => roles.get(r).abstract) yields the same 12. No behavioural change.

Spec reference

Part of a cleanup campaign migrating hand-maintained lists in this plugin to authoritative sources where available. Related refactors migrate aria-unsupported-elements to aria-query's dom.reserved and no-invalid-role to aria-query's role set.

…aria-query

Replaces a hand-maintained list of 12 abstract ARIA roles with a
derivation from aria-query's role taxonomy (role.abstract === true).

aria-query is already a dependency. Future WAI-ARIA additions of
abstract roles flow in automatically on aria-query upgrade instead of
requiring a hand edit here.

No behavioural change — the derived set is identical to the hand list
today.
@NullVoxPopuli NullVoxPopuli merged commit 8ec2dc9 into ember-cli:master Apr 21, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants