Skip to content

fix: clear the storybook axe baseline - #91

Merged
TheGreatAxios merged 7 commits into
corbitsdev:mainfrom
pratikbuilds:claude/a11y-known-violations
Oct 21, 2026
Merged

TheGreatAxios merged 7 commits into
corbitsdev:mainfrom
pratikbuilds:claude/a11y-known-violations

Conversation

@pratikbuilds

@pratikbuilds pratikbuilds commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Rebased onto main after #88 merged. The Storybook commits are no longer in this diff.

What changed

The Storybook axe sweep from #88 had 57 known serious/critical violations in e2e/stories-a11y.known.json. They are all fixed and the list is empty. None were kept.

  • Textarea and Select stories (label, select-name, label-title-only): every control is wrapped in a real <label>. Story-only change.
  • StatusDot (role-img-alt in badge workflow-status and inspector-shell): callers pass label="" when nearby text already names the state. That includes step-list and progress-checklist in src/. The dot rendered an unnamed role="img". An empty label now hides the dot from assistive tech, as <img alt=""> does.
  • SidebarPanelSection (listitem in sidebar-panel channels and live rows): SidebarItemRow renders an <li>, but the panel family had no list to hold it. The Pins doc comment already referred to a SidebarPanelSection. It now exists: a <ul> with an optional label that adds a visible heading and names the list. This is a new export (feat). Existing consumers whose rows sit directly in SidebarPanelBody need to wrap them to be valid.
  • ToolPicker (aria-required-children in loading and empty): the loading, empty-catalog and no-matches copy moves out of the listbox into a role="status" sibling. While the listbox has no options it is hidden, and the combobox reports aria-expanded="false". The listbox stays in the DOM, so aria-controls still resolves.
  • Scroll regions (scrollable-region-focusable in page-panel, tool-block and horizontal-stepper): each scroll container takes tabIndex={0}, the pattern the Tabs tabpanel already uses. The page panel and stepper rail draw the focus ring inset (-outline-offset-2), because the panel's overflow-hidden parent and the rail's edge mask hide an outset ring. The trade-off: a panel or detail box that isn't overflowing still adds a tab stop.
  • Colour contrast (chat-block-card risk-levels): --warn colours the medium RiskBadge label and measured 3.30:1 on the card. A new rule in checksFor (3b) checks the status-text tokens ok and warn as text (4.5:1) on background and card. The light values move to --ok: #2f7c40 and --warn: #966319 to pass it. Dark already passed. --ok was 3.63:1 on the card; it is only used as a fill today, but the theme defines it as status text. These values no longer match the consumer app's app.css, so the comment saying they do is removed.

Verification

  • bun run build && bun run test:e2e: the sweep passes with an empty known list.
  • bun run check (typecheck, lint, format, 245 unit tests), bun run dep-guard, bun run contrast-test: pass.
  • New unit tests: status-dot.test.tsx, sidebar-panel.test.tsx, a ToolPicker status/listbox test, and a ToolBlock focusable-detail test.
  • In the browser, Tab reaches the stepper rail, page panel and tool output box, and each shows a visible focus ring.

Closes #90

@pratikbuilds
pratikbuilds marked this pull request as draft October 19, 2026 11:31
@pratikbuilds

Copy link
Copy Markdown
Collaborator Author

Hi @TheGreatAxios! Could you push the branch behind #88 to corbitsdev/react-ui? My account can only read the repo, and I'd like to stack this PR on top of it.

This PR fixes the accessibility violations that #88's axe sweep records as known, and it's built on #88's branch. A PR's base has to be a branch in this repo, though, and #88's branch exists only on my fork. Until it's here, this PR targets main and its diff also shows #88's two commits.

Pushing it is one fetch and one push:

git fetch https://github.com/pratikbuilds/react-ui.git claude/zealous-mcnulty-3ed6f4
git push origin FETCH_HEAD:refs/heads/claude/zealous-mcnulty-3ed6f4

Please keep that branch name so this PR can be retargeted onto it. If #88 gets new commits before it merges, I'll ask you to push again. Thanks!

@pratikbuilds
pratikbuilds marked this pull request as ready for review October 19, 2026 12:18
Badge, step-list and progress-checklist pass label="" because nearby text
already names the state, which rendered an unnamed role="img". An empty
label now drops the dot from the accessibility tree, as <img alt=""> does.
SidebarItemRow renders an <li>, but the panel family had no list to put it
in, so rows sat directly in a <div>. SidebarPanelSection is that <ul>, with
an optional label that adds a heading and names the list.
A listbox may only own options and groups. Status copy now renders beside
it as role="status", and the listbox hides and the combobox reports
aria-expanded=false while there are no options.
Each scroll container takes tabIndex=0 so it can be scrolled without a
pointer. The page panel and the stepper rail draw the focus ring inset,
since an overflow-hidden parent and the edge mask hide an outset ring.
warn colours the medium RiskBadge label and measured 3.30:1 on the card.
The contrast gate now checks ok and warn as text on the page and the card,
and the light values move to #2f7c40 and #966319 to pass it.
@TheGreatAxios
TheGreatAxios force-pushed the claude/a11y-known-violations branch from e5e614e to 7f656b6 Compare October 19, 2026 19:22
@TheGreatAxios

TheGreatAxios commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Hey @pratikbuilds -- #88 is on main now (ee759b7), so the stack base no longer needs to live as its own branch. I rebased this PR onto current main and dropped the two Storybook commits that already landed. The branch is the seven a11y commits only, force-pushed to pratikbuilds/react-ui:claude/a11y-known-violations.

This should hopefully make things easier, but as 88 was clean seemed simpler to merge that in.

@corbits-triage

Copy link
Copy Markdown
Contributor

Triage: Unsure

Waiting on:

  • checks are still running: cla

@pratikbuilds

Copy link
Copy Markdown
Collaborator Author

LGTM

@TheGreatAxios
TheGreatAxios merged commit 0b54482 into corbitsdev:main Oct 21, 2026
1 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.

Clear the Storybook axe sweep's known-violations list

2 participants