Repository navigation
fix(rules): a11y/select-name reads hidden selects through the shared reader #991 - #994
Merged
Merged
Conversation
…reader #991 Signed-off-by: Nik Cubrilovic <[email protected]>
|
Reviewed the diff. The change reuses the shared
No blocking issues. |
This was referenced Oct 21, 2026
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.
What
a11y/select-namenow reads visibility throughshared/static-hidden.ts(sortUnnamedControls/unconfirmedRow), likeform-labelsandaria-input-field-name. A select out of the accessibility tree (hidden,aria-hidden,display: none, closed dialog) is skipped and counted (hiddenWithoutNameon the pass). A select a style may hide isselect-name-unconfirmed, including ano-jsfallback (itself or a non-root ancestor) on a page with an external stylesheet, with the script-state reason from #990. Visible unnamed selects, and selects on pages whose styles were all read, keep their verdict. It gets the show-only (#940), vendor display (#978), operator attribute (#984) and no-js (#989) handling through the shared reader, no one-off logic.Other rules that bypass the shared reader
Source search of
packages/rules/src/a11y: these fail an unnamed element and do not importstatic-hidden:aria-meter-name,aria-progressbar-name,aria-toggle-field-name,aria-tooltip-name,aria-treeitem-name,input-image-alt,link-text(no hidden handling at all), andframe-title,object-alt,empty-heading(their own partial handling). Not verified one by one that each really fails a hidden element, so filed as #993 (rules, size M, acceptance criteria incl. "fixture first, leave alone if it does not fail"), not fixed here.Tests
New
select-name-hidden-991.test.ts: no-js + external sheet (unconfirmed, script-state label), non-root no-js wrapper, styles read (fail), no marker (fail), hidden/aria-hidden/display:none/closed dialog (pass withhiddenWithoutName), undecidable rule (generic label), named select and no selects, and a parity table assertingselect-name,form-labelsandaria-input-field-nameagree on 8 fixtures. 8 of the 15 tests fail against the old rule. Docs:select-namepage gains the hidden-selects section and the unconfirmed row;solutiontext updated;tangly check --strictpasses.Closes #991
skills: no change