Skip to content

test(checks/shared): confirm element internals do not trigger role conflict resolution#5175

Open
chutchins25 wants to merge 3 commits into
developfrom
chut/5145-checks-shared-internals
Open

test(checks/shared): confirm element internals do not trigger role conflict resolution#5175
chutchins25 wants to merge 3 commits into
developfrom
chut/5145-checks-shared-internals

Conversation

@chutchins25

@chutchins25 chutchins25 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Audited lib/checks/shared for the #5044 conversion — no getAriaValue/hasAriaValue conversion applies:

So this is a test-only change: it adds a test demonstrating that a global ARIA attribute supplied via element internals does not override a presentational role. No production code changes.

Closes #5145

Use hasAriaValue in presentational-role so a global ARIA attribute
supplied via the reflected AOM property or element internals counts
toward role-conflict reporting, not only the HTML attribute. The
elementInternals flag gates only the internals source.

Closes #5145

Copilot AI 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.

Pull request overview

This PR updates the presentational-role check in lib/checks/shared so that “global ARIA attribute present” detection considers ARIA values provided via reflected ARIA IDL properties and (when enabled) ElementInternals—not just literal HTML attributes—aligning the check with the internals-aware ARIA resolver behavior.

Changes:

  • Switch global-ARIA presence detection in presentational-role from virtualNode.hasAttr to hasAriaValue.
  • Add tests to cover global ARIA provided via a reflected AOM property and via ElementInternals.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/checks/shared/presentational-role-evaluate.js Uses hasAriaValue to treat reflected ARIA properties / internals-sourced global ARIA as present for role-conflict messaging.
test/checks/shared/presentational-role.js Adds coverage for global ARIA set via ariaLive property and via _internals.ariaLive.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chutchins25 chutchins25 marked this pull request as ready for review June 16, 2026 14:07
@chutchins25 chutchins25 requested a review from a team as a code owner June 16, 2026 14:07
Comment thread test/checks/shared/presentational-role.js Outdated
Comment thread test/checks/shared/presentational-role.js Outdated
Comment thread lib/checks/shared/presentational-role-evaluate.js Outdated
…nflict resolution

Revert the presentational-role conversion to hasAttr — per #5162 no browser
treats element internals as participating in role conflict resolution. Add a
test confirming an internals-set global ARIA attribute does not override a
presentational role.
@chutchins25 chutchins25 changed the title feat(checks/shared): support ARIA element internals properties test(checks/shared): confirm element internals do not trigger role conflict resolution Jun 30, 2026
@chutchins25 chutchins25 requested a review from WilcoFiers July 1, 2026 12:27
@chutchins25 chutchins25 dismissed WilcoFiers’s stale review July 1, 2026 12:27

Tweaked some things. Need new review.

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.

ElementInternals: convert lib/checks/shared to getAriaValue/hasAriaValue

3 participants