test(checks/shared): confirm element internals do not trigger role conflict resolution#5175
Open
chutchins25 wants to merge 3 commits into
Open
test(checks/shared): confirm element internals do not trigger role conflict resolution#5175chutchins25 wants to merge 3 commits into
chutchins25 wants to merge 3 commits into
Conversation
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
Contributor
There was a problem hiding this comment.
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-rolefromvirtualNode.hasAttrtohasAriaValue. - 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.
WilcoFiers
previously requested changes
Jun 18, 2026
…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.
Tweaked some things. Need new review.
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.
Audited
lib/checks/sharedfor the #5044 conversion — nogetAriaValue/hasAriaValueconversion applies:aria-label/aria-labelledbychecks delegate to the already-convertedcommons/ariahelpers (arialabelText/arialabelledbyText), so they're internals-aware transitively.presentational-roleuses one global-ARIA presence check for role conflict resolution, which stayshasAttr— element internals must not trigger conflict resolution (no browser supports it yet; see ElementInternals ARIA role conflict resolution #5162). This matches the convention already set in feat(checks/aria): support ARIA element internals properties #5172 (has-global-aria-attribute) and feat(commons/aria): support ARIA element internals properties #5171 (get-role).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