Skip to content

Extend the accessible-name guard to <select> and <textarea> #4309

Description

@atomantic

The repo-wide a11y guard ("gives every input an accessible name") currently inspects <input> tags only. <select> and <textarea> are outside its scope entirely, so a newly-added unlabeled dropdown or textarea passes CI silently.

Scope

  • Extend the guard in the client a11y test to parse <select> and <textarea> opening tags with the same brace-aware logic already used for <input> — including the existing escape hatches: aria-label/aria-labelledby, an id targeted by an htmlFor in the same file, isNestedInLabeledFormField(), and isNestedInLabelWrappingComponent() (added in name the unlabeled inline form controls on the a11y sweep's high-value pages #4307).
  • Extending it will surface a fresh backlog of pre-existing offenders. Seed a separate allowlist for them (mirroring PREEXISTING_INPUT_NAME_ALLOWLIST, tracked for migration the same way Add accessible names to pre-existing unlabeled input controls #4297 tracks the input one) so the guard lands green and the backlog burns down incrementally — do NOT mass-apply aria-label to clear it.

Why separate

Kept out of #4307 deliberately: that PR removed 20 entries from the input allowlist, and adding a whole new tag class in the same diff would have mixed a backlog burn-down with a backlog creation.

Refs #4156

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestplanTracked by /do:replan

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions