Skip to content

test(e2e): find the command palette button by its accessible name - #13

Open
davis9001 wants to merge 6 commits into
mainfrom
apollo/run-2bdb55d9
Open

davis9001 wants to merge 6 commits into
mainfrom
apollo/run-2bdb55d9

Conversation

@davis9001

@davis9001 davis9001 commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

CI on main has failed since f13a3f8 (run 35748719781). That commit dropped the command palette button's aria-label so its accessible name matches its visible text (WCAG 2.5.3). Two e2e tests still located the button with button[aria-label="Open command palette"], never found it, and timed out.

The fix changes both locators to getByRole('button', { name: /open command palette/i }). The component is unchanged, so the accessibility fix stays. No test is skipped or loosened.

I did not run the e2e suite locally (dependencies are not installed in this worktree and the run needed approval), so this PR's own CI run is the proof.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

davis9001 and others added 6 commits September 26, 2026 19:22
Appended as the last Release Rules bullet so existing § numbers hold.
Switch on data-theme, not prefers-color-scheme: the toggle overrides the OS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WMicDfQtzkyrzjKLk4KExV
A bare Escape opens the command palette, and its preventDefault cancelled
a native <dialog>'s own close. A modal could not be dismissed by key, and
the palette opened over it instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011fq6DwPCHzHvvHZsMPrReN
$lib/ui adds 27 standard elements:
- Actions: Button, Menu
- Forms: Field, TextInput, Textarea, Select, Checkbox, RadioGroup,
  Switch, Slider
- Feedback: Alert, Toaster with a toast store, Badge, Progress,
  Spinner, Skeleton
- Overlays: Dialog (native <dialog>), Tooltip
- Navigation: Tabs, Accordion (<details>), Breadcrumbs, Pagination
- Data display: Card, Table (sortable), Avatar, Kbd, EmptyState

All use CSS variables only and work in light and dark. axe finds no
violations in either theme, and all work by keyboard. Decision logic
(page ranges, roving focus, sorting, initials) is in logic.ts at 100%
coverage. Behaviour tests are in ui.test.ts.

New *-solid tokens give white text at least 4.5:1. White on the dark
theme's --color-primary measures only 3.7:1.

The widget registry no longer ships empty. Stat, clock and notes come
from the marketing site, and checklist, meter and links are new.
The clock test asserted >= 0 and used the removed $on API. It now
checks that the reported time is the one shown.

/components shows every element and widget running, with its code.
catalog.test.ts fails when a component or widget has no catalog entry.
The root layout renders <Toaster />. The page is in the sitemap, the
footer and the command palette. /documentation has a UI Kit section,
and docs/UI_KIT.md has the reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011fq6DwPCHzHvvHZsMPrReN
…can see

The marketing site runs Svelte 4, so the kit now compiles cleanly on
both versions:
- No TypeScript casts in Pagination's markup.
- Accordion sets <details name> through an action.
- Dialog's backdrop click and the Table's focusable frame are set in
  code. Both a11y linters accept that without an ignore comment.
- No @starting-style.
- Tests listen for events through a harness callback, because
  testing-library has `events:` only in 5 and `$on` only in 4.

The Slider draws its own track and thumb. On the dark surface the
native track did not show.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011fq6DwPCHzHvvHZsMPrReN
The site runs Prettier 3.8 and the template 3.9. They disagreed on two
spots, and the kit is kept byte for byte identical in both repos.
CatalogGroup is now derived from CATALOG_GROUPS. Textarea spreads its
attributes reactively, so the tag stays on one line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011fq6DwPCHzHvvHZsMPrReN
The button lost its aria-label when its visible text became its accessible
name (WCAG 2.5.3). Two e2e tests still looked for the label, never found the
button, and failed CI on main. Match by role and name instead.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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