Skip to content

a11y: naming rules without the shared hidden-control reader may fail hidden or no-js elements (#991 follow-up) #993

Closed

Description

@nc9

What happens

After #991, these a11y rules that fail an unnamed or unlabelled element do not use the shared hidden-control reader (packages/rules/src/shared/static-hidden.ts) that button-name, form-labels, aria-input-field-name, aria-command-name, aria-labels, aria-dialog-name, aria-hidden-focus and select-name use. Source search: no static-hidden import, and no hidden/aria-hidden/display handling in aria-meter-name, aria-progressbar-name, aria-toggle-field-name, aria-tooltip-name, aria-treeitem-name, input-image-alt, link-text. frame-title, object-alt and empty-heading read some hidden state themselves, not through the shared reader.

So an element out of the accessibility tree (the hidden attribute, aria-hidden, display: none, a closed dialog) may be reported as a failure, and one a style may hide (for example a no-js fallback on a page with an unread stylesheet) is decided instead of unconfirmed. This needs a per-rule check that the failure is reproducible before the change; where it is not, the rule is left as it is.

Acceptance Criteria

  • For each rule listed, a fixture shows whether a hidden element (hidden, aria-hidden, display: none, closed dialog) is reported today; rules that do not report it are noted and left alone.
  • Each rule that does report one reads visibility through shared/static-hidden.ts (sortUnnamedControls / unconfirmedRow), so a hidden element is skipped and one a style may hide is <check>-unconfirmed.
  • A visible unnamed element still fails, and a page whose styles were all read keeps its verdict.
  • A no-js fallback on a page with an unread stylesheet is unconfirmed with the script-state reason, for each rule changed.
  • Each changed rule's docs and solution text say how hidden elements are treated.

Activity

  1. added
    size: M
    rules
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    rulessize: M

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions