Skip to content

Accessibility drill, round 1: names, roles and keyboard reach - #207

Merged
lorant-one merged 4 commits into
previewfrom
fix/a11y-components-round-1
Oct 18, 2026
Merged

lorant-one merged 4 commits into
previewfrom
fix/a11y-components-round-1

Conversation

@lorant-one

Copy link
Copy Markdown
Member

Requested by Lorant · project thread

Before: axe (WCAG 2.2 AA + best practice) over all 180 docs pages, light and dark, reported 9,480 failing nodes. The largest: every closed Accordion left its links in the tab order behind aria-hidden (3,249), Avatars were unnamed images, sliders inside Setting had no name, CompareImage could only be dragged with a pointer, and EmojiPicker claimed a grid it did not have.

After: the same scan reports 3,337, and everything left except 168 nodes is colour contrast (handled in a separate PR). Nothing changes visually except Swiper dots, which keep their size but get 24px hit areas.

How:

  • Accordion: closed panel is inert; panel id is unique per instance (was a shared accordion-content).
  • Avatar / Icon / Skeleton: labels sit on an element with a role (img, status) instead of a bare div/span.
  • ProgressBar: the bar is named (aria-label, default "Progress").
  • Setting / SettingAxes: a Slider or Switch inside is named by the row's label through an internal ControlLabelContext.
  • CompareImage: the handle is a slider (arrows, Page Up/Down, Home/End).
  • EmojiPicker: group of buttons instead of a row-less grid; category tabs named.
  • Swiper: 24px dot targets (WCAG 2.5.8); track focusable when it scrolls.
  • CodeBlock, Table, SplitView: scroll containers become focusable while they overflow (internal/scrollableTabStop).
  • Media: YouTube iframe gets a title. Input/Textarea: fall back to a generated id so the label always reaches the field. DataTable: pagination landmark named after the table. Feedback: close control is always a button.
  • Docs: footer/aside/main landmarks; unnamed demos named; List example nests lists inside items; links inside descriptions underlined.

Tests: new a11y-drill.test.tsx (8 cases with axe); full core suite 1,982 passing; typecheck clean; no new Biome errors in touched files.


Generated by Claude Code

axe over every docs page in light and dark found these in core components:

- Accordion: a closed panel's links stayed in the tab order behind
  aria-hidden; the panel is now inert, and its id is unique per accordion
  instead of a shared "accordion-content".
- Avatar: role="img" with no name; the name now sits on the image,
  including the status. Icon and Skeleton expose an aria-label through a
  role instead of on a bare element.
- ProgressBar: the bar had no name; aria-label lands on it, "Progress" by
  default.
- Setting / SettingAxes: a Slider or Switch inside takes the row's label as
  its name (new internal ControlLabelContext).
- CompareImage: the handle is a keyboard slider (arrows, Page keys,
  Home/End) instead of a pointer-only, unnamed div.
- EmojiPicker: role="grid" with gridcells and no rows became a group of
  buttons; category tabs are named.
- Swiper: dot targets are 24px (WCAG 2.2 target size), dots unchanged.
- CodeBlock and Table: scroll containers that overflow are focusable.
- Media: YouTube iframes get a title. Input and Textarea fall back to a
  generated id so a label always reaches the field.
- DataTable: its pagination landmark is named after the table.

Docs: footer, aside and the home page's main are landmarks; demos for
Option, Dropdown, IconButton, EmojiPickerDropdown, FlipFx, Pagination and
Breadcrumbs are named; the List example nests lists inside items.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_0183UV8SQBGYKctRTFAv64N8
- Swiper's track and SplitView's panels take focus while they overflow,
  so a keyboard can scroll them.
- Feedback's close control is a real button even without onClose; it was
  a div carrying an aria-label.
- Docs: links inside descriptions are underlined (link-in-text-block),
  the home promo card and the basic Slider demo are named.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_0183UV8SQBGYKctRTFAv64N8
@vercel

vercel Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
core-docs Ignored Ignored Preview Oct 18, 2026 7:26am UTC

@lorant-one lorant-one self-assigned this Oct 18, 2026
@lorant-one
lorant-one merged commit 800aa79 into preview Oct 18, 2026
7 checks passed
@lorant-one lorant-one added the no-demo label Oct 18, 2026 — with Claude
@github-actions github-actions Bot mentioned this pull request Oct 18, 2026
30 tasks done
lorant-one pushed a commit that referenced this pull request Oct 18, 2026
…areImage, EmojiPicker and Swiper

The accessibility thread fixed the same components on preview (#207). Its
implementations win; our interaction tests now test them. Keeps one
behaviour fix from our side: no stray "undefined" class on a loading Avatar.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01DYxmeZdGfZSDrgUsjiPUvE
@lorant-one
lorant-one deleted the fix/a11y-components-round-1 branch October 29, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants