Switch is neither perceivable nor operable by assistive technology

Open
#550 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
ruby
Domain
accessibility

Research direction

Start with switch.rb and the controller that drives the switch state on the 2.0 line. Replace the hidden input approach and add the state reflected by aria-checked, then re-record and review the switch/* snapshots as the completion check.

Written by the indexing model from the issue text.

Description

bug
  • 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.

Dominant language
Ruby
Stars
1k
Forks
67
Avg merge
2d 19h
Merged PRs (30d)
18

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ruby-ui/ruby_ui

All issues in ruby-ui/ruby_ui

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.