Skip to content

Switch is neither perceivable nor operable by assistive technology #550

Description

@cirdes
  • Where: switch.rb: role: "switch" on the label with no aria-checked; the checkbox input carries class: "hidden peer" (display: none). Snapshots switch/*.
  • Effect: the switch role requires aria-checked; a display: none input leaves the accessibility tree and the tab order, so keyboard users cannot toggle it and the label's focus-visible: classes never apply.
  • Fix: render aria-checked and keep it in sync from the controller; sr-only instead of hidden so the input stays focusable; re-record switch/*.

Surfaced by the strict lane of the golden HTML suite (PR #548), which pins what 1.6 renders today — this defect included. Per maintainer decision (2026-09-19) main stays as is: this is addressed on the 2.0 line, and the golden snapshots that pin it are re-recorded there with the diff reviewed.

Source: design/v2/follow-up-issues.md.

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions