Skip to content

frontend: SVG/icon-button accessibility (#1719)#1723

Merged
sohni-tagirisa merged 1 commit into
epic/frontend-ui-polishfrom
fix/1719-a11y
Jun 23, 2026
Merged

frontend: SVG/icon-button accessibility (#1719)#1723
sohni-tagirisa merged 1 commit into
epic/frontend-ui-polishfrom
fix/1719-a11y

Conversation

@sohni-tagirisa

Copy link
Copy Markdown
Collaborator

What

Add basic accessibility attributes to SVGs/icons. Sub-PR of EPIC #1720targets epic/frontend-ui-polish, not main.

Changes

  1. components/Icon.tsx — default aria-hidden="true" on all 24 shared icon components, inserted before {...props} so any consumer can override it (e.g. pass aria-label for a meaningful icon). This is the high-leverage change: it makes icon-component usage screen-reader-safe app-wide, not just on this surface. Mirrors the Heroicons convention (decorative by default).
  2. App.tsx — 21 decorative inline SVGsaria-hidden="true". All sit next to visible text (button labels, status messages, section headers), so they're noise for a screen reader.
  3. App.tsx — 2 brand logosrole="img" aria-label="Prompt Driven". The adjacent <h1>Prompt Driven</h1> is hidden sm:block, so on mobile the logo was the only branding and had no accessible name. Now it does.

Scope notes

  • No naked icon-only buttons remain on this surface: the audio toggle and Remote/Local toggle already carry title / sr-only labels; everything else has visible text.
  • Inline <svg> in other components (~270 across the app) are intentionally a follow-up — the Icon.tsx default already covers the shared-icon path everywhere. Kept this PR focused/reviewable.

Verification

  • All 24 Icon.tsx components have an overridable aria-hidden default
  • All 23 inline SVGs in App.tsx have aria attributes (21 hidden, 2 labeled logos)
  • No visual change (attributes only)
  • npm test (vitest) — 54 passed / 12 files

Closes #1719

🤖 Generated with Claude Code

- Icon.tsx: default aria-hidden="true" on all 24 shared icon components,
  placed before {...props} so consumers can override for meaningful icons.
- App.tsx: aria-hidden="true" on 21 decorative inline SVGs (all accompanied
  by visible text), and role="img" aria-label="Prompt Driven" on the 2 brand
  logos — fixing the mobile gap where the adjacent <h1> is hidden (sm:block)
  and the logo was the only branding with no accessible name.

Existing icon-only buttons already carry title/sr-only labels, so no naked
controls remain on this surface. Inline SVGs in other components are a
follow-up sweep; the Icon.tsx default already covers icon-component usage
app-wide.

Closes #1719

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@sohni-tagirisa sohni-tagirisa self-assigned this Jun 23, 2026
@sohni-tagirisa sohni-tagirisa merged commit a0ec49e into epic/frontend-ui-polish Jun 23, 2026
0 of 2 checks passed
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