Skip to content

Name controls, headings, and the toast region (AX-01, AX-05, AX-06, AX-08, AX-09) - #200

Merged
Programcode merged 3 commits into
mainfrom
cursor/a11y-names-headings-365c
Oct 22, 2026
Merged

Programcode merged 3 commits into
mainfrom
cursor/a11y-names-headings-365c

Conversation

@Programcode

Copy link
Copy Markdown
Owner

Accessible names, headings, and landmarks only. Colors, sizes, and layout are unchanged. This is a local npm run verify pass, not a CI pass. GitHub Actions minutes are exhausted, so CI was not used as proof.

AX-01 — language button

The globe button already exposes langSwitcher.label (Language / Idioma / Nyelv) in the landing navbar (desktop and mobile) and the app header. Both open-menu radiogroups already have names (Felület nyelve / AI kimenet nyelve, and the Spanish pair). The English fallback string is now Language, so a missing key still matches that name. The globe icon is hidden from assistive tech.

AX-05 — Attack options

“Detect fallacies” and “Analyze weighing” were already labelled and described. The Options, Intensity, and Paradigm labels are now associated with their controls (htmlFor / aria-labelledby). The Options button name includes both “Options” and “More options”.

AX-06 — one main, and the landing demo

The hero product preview is hidden from assistive tech and inert. The fake motion field is out of the tab order. The real mode toggles stay focusable. AppLayout still renders one main, and the pages in this change do not add another. Axe reported one main on every scanned route.

AX-08 — toast region

containerAriaLabel is common.notifications: Notifications / Notificaciones / Értesítések. Sonner appends the hotkey, so the region is announced as “Notificaciones alt+T” (and the English and Hungarian equivalents), not the English default.

AX-09 — names, progress, headings

  • Generate selects (Side, Speaker Role, Case Length, Audience Level, Tone) are named via the visible labels.
  • Flowchart edits are attribute-only. Title, label, description, type, and strength are associated. The always-visible link-type select is named “Link type” / “Tipo de enlace” / “Kapcsolat típusa”. The selected-node heading stays an h3 with aria-level={2}.
  • The timer progress bar is named with the current speech (timer.speechProgress) and receives a numeric value, so it is no longer an unnamed indeterminate progressbar. Other progress bars still pass value through; the indicator math is unchanged.
  • CardTitle defaults to h2, with an as prop when a different level is required. The class string is unchanged (text-lg font-semibold leading-tight tracking-[-0.014em]). No app stylesheet targets those card headings as h3. The only [&_h3] rule is on the free-tool article layout, which does not wrap CardTitle. Replacing an h2 with an h3 that has the same classes, in place, produced no computed-style difference on /app, /app/settings, and /app/timer (18px, weight 600, line-height 22.5px, letter-spacing, margin, padding, color, display).
  • Empty-state titles and result subsection headings that sat directly under a card title are one level lower or an h2, so the new default does not introduce a skip on Generate, Attack, Factoids, or Brainstorm.
  • The admin “Access Denied” card is the only heading on that view, so it is an h1. The navigation performance spec looks for main h1.

Axe

axe-core 4.10.3, desktop 1280×800, tags wcag2a, wcag2aa, wcag21a, wcag21aa, and best-practice. Local stub session. Not a production scan.

Route Before (in scope) After (in scope) Still failing
/ 0 0 —
/app heading-order 1 0 color-contrast 1 (Tools)
/app/generate button-name 2, heading-order 1 0 color-contrast 1
/app/flowchart button-name 1, heading-order 1 0 color-contrast 18
/app/timer aria-progressbar-name 1, heading-order 1 0 color-contrast 2
/app/settings heading-order 1 0 color-contrast 1
/app/attack heading-order 1 0 color-contrast 1

Unsigned landing confirmed Hungarian (Értesítések alt+T, button Nyelv, radiogroups Felület nyelve and AI kimenet nyelve) and Spanish (Notificaciones alt+T, Idioma).

npm run verify (local, exit 0)

  • docs:check, lint (eslint, knip, repo rules), typecheck
  • vitest: 66 files, 453 tests passed
  • collaboration: 5 files, 30 tests passed
  • edge (Deno): 406 passed, 0 failed
  • production build, prerender, sitemap, check-site (48 HTML files, no problems)
  • service worker offline check passed
  • desktop Chromium @smoke: 43 passed (28.0s)

Two earlier runs of the same command failed only in src/test/scripts/backend-status.test.ts. The hook calls git commit, and this environment’s commit.gpgsign SSH signer (ssh-keygen -Y sign) stalled past the 10s hook timeout. The recorded run set commit.gpgsign=false for child git processes. That test file was not changed. A local pass is not a CI pass.

Moved out; not touched

  • AX-05 Ask message box (AskChat / AskPage, batch T5)
  • AX-06 Sparring nested main (SparringRound, batch T5)
  • AX-06 Crossfire has no heading (CrossfirePage, batch T5). Source already has h1s; not rechecked in the browser because that file is owned by T5.
  • AX-06 signed-out views have no main (LoginPage / RequireAuth, batches T2 and T3)

Out of scope for T10

Color contrast and target size stay as they are: the signed-in “Tools” nav label, flowchart badges, the timer speech tab, and a settings badge. The React Flow attribution did not show up as a failing node in this axe run.

Left open

History and Library item titles are h4 elements in files this batch must not edit. CardTitle is now h2, so a populated History or Library list can skip from h2 to h4. Empty states do not skip. /app/history and /app/library were not in the axe route list.

Open in Web Open in Cursor 

Card titles default to h2 so a page h1 is not followed by an h3. Generate and flowchart selects, the timer progress bar, and attack options have accessible names, the toast region follows the UI language, and the landing demo leaves the tab order.

Co-authored-by: Gáborjáni-Szabó Ádám <Programcode@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Next included review available in 40 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 1b00d89 and 3323e64.

📒 Files selected for processing: 21
  • e2e/navigation-performance.spec.ts
  • src/components/LanguageSwitcher.tsx
  • src/components/features/attack/AttackForm.tsx
  • src/components/features/attack/AttackResults.tsx
  • src/components/features/brainstorm/BrainstormResults.tsx
  • src/components/features/factoids/FactoidsResults.tsx
  • src/components/features/generate/GenerateForm.tsx
  • src/components/features/generate/GenerateResults.tsx
  • src/components/landing/Hero.tsx
  • src/components/ui/card.tsx
  • src/components/ui/empty-state.tsx
  • src/components/ui/progress.tsx
  • src/components/ui/sonner.tsx
  • src/locales/en.json
  • src/locales/es.json
  • src/locales/hu.json
  • src/pages/AdminPage.tsx
  • src/pages/FlowchartPage.tsx
  • src/pages/LoginPage.tsx
  • src/pages/TimerPage.tsx
  • src/test/a11y/names-and-headings.test.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.

Comment @coderabbitai help to get the list of available commands.

@Programcode
Programcode marked this pull request as ready for review October 22, 2026 23:24
Copilot AI balanced review requested due to automatic review settings October 22, 2026 23:24
@Programcode
Programcode merged commit 2a1e82e into main Oct 22, 2026
3 of 9 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

3 participants