fix(a11y): make copy actions reachable by keyboard #36

Open
opened 2026-10-28 21:52:11 +00:00 by flopana · 0 comments
Owner

Part of #30

Branch: bugfix/copy-a11y

Bug

Some copy actions are an onClick on a div or a Label. A keyboard user cannot reach them. Screen readers get no role and no name.

Targets:

  • src/components/Code/JsonFormatterComponent.tsx
  • src/components/Code/JsonSorter.tsx
  • src/components/Code/TimestampConverterComp.tsx
  • src/components/Generator/HashingGenComp.tsx
  • src/components/Code/SemverRangeParser/RangeResults.tsx
  • src/components/Code/UnicodeCharDetector.tsx (2 places)
  • src/pages/Home.tsx (check first)

UUIDGenComp.tsx and LoremIpsumGenComp.tsx already use Button.

Red test

Each copy target has role button and an accessible name. Enter copies the value.

Fix

Replace the div or Label with onClick by the existing Button from src/components/ui/button.tsx.

Merge order

Merge this branch last. See the parent issue.

Part of #30 Branch: `bugfix/copy-a11y` ## Bug Some copy actions are an `onClick` on a `div` or a `Label`. A keyboard user cannot reach them. Screen readers get no role and no name. Targets: - `src/components/Code/JsonFormatterComponent.tsx` - `src/components/Code/JsonSorter.tsx` - `src/components/Code/TimestampConverterComp.tsx` - `src/components/Generator/HashingGenComp.tsx` - `src/components/Code/SemverRangeParser/RangeResults.tsx` - `src/components/Code/UnicodeCharDetector.tsx` (2 places) - `src/pages/Home.tsx` (check first) `UUIDGenComp.tsx` and `LoremIpsumGenComp.tsx` already use `Button`. ## Red test Each copy target has role `button` and an accessible name. Enter copies the value. ## Fix Replace the `div` or `Label` with `onClick` by the existing `Button` from `src/components/ui/button.tsx`. ## Merge order Merge this branch last. See the parent issue.
Sign in to join this conversation.
No description provided.