Skip to content

fix(web): expose selection state to assistive technology - #30

Merged
PunGrumpy merged 1 commit into
mainfrom
interface/01-selection-semantics
Aug 7, 2026
Merged

fix(web): expose selection state to assistive technology#30
PunGrumpy merged 1 commit into
mainfrom
interface/01-selection-semantics

Conversation

@PunGrumpy

@PunGrumpy PunGrumpy commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Problem

The interface review of the merged motion stack flagged (pre-existing, MEDIUM) that every selection state in the app was visual only: the format segmented control, the queue filter tabs, and the queue items all announced themselves to screen readers as identical, stateless buttons.

Root Cause

No control carried a programmatic state attribute — active/selected was expressed purely through Tailwind color/background classes.

Solution

Each control gets the semantics that match its behavior, per better-accessibility ("native elements first", "accessible names everywhere"):

  • The format segmented control moves into a fieldset with a legend ("Output Format") — the repo's lint (jsx-a11y/prefer-tag-over-role) correctly pushed this over role="group" — with aria-pressed on each segment.
  • The filter tabs (All / Optimized / Errors) get aria-pressed, since they toggle a filter.
  • The selected queue item gets aria-current="true", the semantic for the current item in a set.

Result

Screen readers now announce toggle and selection state everywhere it exists visually. No visual change; typecheck, lint, 43 tests, and react-doctor 100/100 all pass.

🤖 Generated with Claude Code

The format segmented control, queue filter tabs, and queue items
communicated their active/selected state visually only — screen readers
heard identical buttons. The segmented control now lives in a
fieldset/legend group with aria-pressed on each segment, the filter
tabs carry aria-pressed, and the selected queue item carries
aria-current, matching each control's semantics (toggle vs current item
in a set).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pigo Ready Ready Preview Aug 7, 2026 5:22pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
pigo-api Skipped Skipped Aug 7, 2026 5:22pm

@vercel
vercel Bot temporarily deployed to Preview – pigo-api August 7, 2026 17:21 Inactive
@changeset-bot

changeset-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c23297a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit c23297a.

@PunGrumpy
PunGrumpy merged commit 4bf394f into main Aug 7, 2026
10 checks passed
@PunGrumpy
PunGrumpy deleted the interface/01-selection-semantics branch August 7, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant