Improve accessibility across Kumo components, charts, and docs#592
Improve accessibility across Kumo components, charts, and docs#592pedromenezes1 wants to merge 2 commits into
Conversation
commit: |
Docs PreviewCommit: |
|
/bonk any objections? |
There was a problem hiding this comment.
/bonk review — approved with observations
This is an excellent, thorough accessibility improvement. The changes are well-scoped, tests are comprehensive, and the developer experience (dev warnings, localizable labels, preserved visual design) is thoughtful.
What looks great
- Accessible-name enforcement — Dev warnings on SensitiveInput, Switch, Button, CommandPalette.Input, Combobox, and Autocomplete when labels are missing. This will catch real product bugs without breaking builds.
- Localization — Labels are extracted into interfaces (SensitiveInputLabels, BreadcrumbsLabels, TimeseriesTimeRangeControlsLabels, etc.) with sensible English defaults. This matches Kumo's existing i18n patterns.
- Keyboard and pointer fallbacks — TimeseriesChart adds native select range controls without removing brush behavior. SankeyChart adds a visually-hidden focusable action list for nodes/links. Both preserve the existing mouse-driven UX.
- Hit-area expansion — Pseudo-element targets on compact Button, Switch, Table.ResizeHandle, SensitiveInput controls, and ChartLegend.SmallItem meet WCAG 2.2 target-size requirements without changing visual density.
- ARIA wiring — Group descriptions/errors are associated via stable IDs and aria-describedby on Checkbox.Group, Radio.Group, Switch.Group, InputGroup, Select, Combobox, and Autocomplete. aria-invalid is propagated where appropriate.
- Live regions — CommandPalette.List supports aria-busy, loading states announce via role="status", and SensitiveInput announces reveal/hide/copy state changes.
- Docs improvements — Skip link, mobile drawer focus trapping, aria-current="page", disclosure semantics in SidebarNav, and cleanup of inaccessible demo patterns (empty links, unlabeled icon buttons).
- Tests — 282 accessibility-related component tests pass. Coverage includes warning behavior, ARIA attribute association, live-region text, and keyboard action rendering.
Observations (non-blocking)
- Pre-existing test failures — The 12 failures in add.test.ts and blocks.test.ts are caused by a missing ai/component-registry.json (auto-generated, gitignored). These failures exist on main and are unrelated to this PR.
- Dynamic aria-label on copy button — In SensitiveInput, the copy button switches its aria-label between "Copy to clipboard" and "Copied". The live region below already announces "Copied to clipboard", which is the better pattern. Changing the accessible name itself can disorient screen-reader users. Consider keeping a static aria-label and relying on the live region for state feedback.
- Switch color tokens — Switch still uses raw Tailwind colors (bg-blue-500, dark:bg-blue-600, bg-neutral-200, etc.). These are pre-existing, but worth noting that they violate Kumo's semantic-token convention. A future refactor should migrate these to bg-kumo-brand / light-dark() equivalents.
- Duplicate aria-describedby on group wrappers — Both BaseCheckboxGroup (role="group") and Fieldset.Root receive aria-describedby and aria-invalid. The duplication is harmless (screen readers generally prefer the fieldset semantics), but it's slightly redundant.
Visual regression
The 26 changed screenshots are all expected: Button hit-area expansion, Dialog backdrop/alignment shifts from focus styles, Select padding adjustments from error/description association, and Breadcrumbs separator/icon hiding. Diffs are small (0–1.8%) and consistent with the PR's goals.
Verdict: Approve. No changes required.
|
/bonk review posted on PR #592 — approved with observations. I reviewed the key accessibility changes across components, charts, blocks, and docs. The PR is high-quality: comprehensive dev warnings for missing accessible names, well-structured localizable labels, keyboard fallbacks that preserve existing mouse behavior, expanded hit areas via pseudo-elements, and 282 passing component tests. Noted (non-blocking):
Visual regression diffs are expected and small (0–1.8%). |








































































This PR addresses accessibility gaps across Kumo’s component library, chart interactions, installable blocks, and docs examples.
The main goals are to improve screen reader context, keyboard and pointer access, reduced-motion behavior, localized accessibility copy, and form error associations without broad UI rewrites.
Components
CommandPalette
dialogTitleso the dialog has an accessible name.busysupport on the list so async result loading can be announced.SensitiveInput
Switch
aria-label, oraria-labelledbyis provided.aria-invalidand announced error text for invalid groups.Button
Checkbox, Radio, and Switch groups
aria-describedbyandaria-invalidto the group.role="alert".Select, Combobox, Autocomplete, SensitiveInput, and InputGroup
aria-labeloraria-labelledbyinstead of a visible label.aria-describedbyandaria-invalidon the actual focusable control.Combobox and Autocomplete
aria-labelandaria-labelledbypass-through.Breadcrumbs
Table
Charts
Chart wrapper
ariaoptions while adding accessible defaults.TimeseriesChart
SankeyChart
ChartLegend
aria-pressed.Blocks
Docs
aria-current="page"to active sidebar links.aria-expandedandaria-controls.href="#"examples.Banner,ClipboardText,Combobox,Breadcrumbs,Table,CommandPalette,SensitiveInput,Switch, and chart pages.