Skip to content

fix(a11y): name-role-value compliance, partial (WCAG 4.1.2)#3434

Open
bilal-karim wants to merge 1 commit into
mainfrom
a11y/4.1.2-name-role-value
Open

fix(a11y): name-role-value compliance, partial (WCAG 4.1.2)#3434
bilal-karim wants to merge 1 commit into
mainfrom
a11y/4.1.2-name-role-value

Conversation

@bilal-karim
Copy link
Copy Markdown
Member

Summary

Five 4.1.2 fixes batched per SC. Three audit issues deferred for reasons explained below.

Applied

  • Accordion content panel: removed role=\"textbox\". Static disclosure panel was being announced as an editable text input on every Accordion consumer (NVDA "edit text", JAWS forms-mode switch). One-line deletion. (audit-output/issues/4.1.2-accordion-content-role-textbox.md)
  • Accordion + AccordionLight structural fix: moved slot=\"action\" out of the disclosure <button> into a sibling element. Previously a <button><button>... nested-interactive output if a consumer placed focusable content there. The audit's recommended Part 2 runtime check is deferred. (audit-output/issues/4.1.2-accordion-action-slot-nested-interactive.md)
  • CopyButton translated defaults: copyIconTitle / copySuccessIconTitle now default to i18n strings instead of empty. Fixes ~11 CodeBlock-via-default instances that rendered unlabeled icon-only buttons (because empty title → Icon self-hides → button name = ""). (audit-output/issues/4.1.2-copy-button-no-name.md)
  • Nav hidden filter: nav-section.svelte now filters items where hidden=true. Standalone Activities (server <1.30.0) and Nexus (no systemInfo.capabilities.nexus) no longer render as focusable links for AT users on incapable servers. (audit-output/issues/4.1.2-nav-hidden-flag-ignored.md)
  • Workflow family tree aria-labels: added aria-label=\"Workflow {id}: {status}\" to both <g role=\"button\"> widgets so AT announces node identity. (Partial fix for audit-output/issues/4.1.2-relationships-nested-interactive.md — Defect 1 only.)

Deferred (need separate PRs)

  • 4.1.2-button-anchor-empty — audit recommends a two-PR sequenced rollout (primitive change + consumer migration). Out of scope for this batch.
  • 4.1.2-codemirror-no-name — ~5 CodeBlock consumer surfaces need design input on label content (Pending Nexus Operation panels, Standalone Activity Details, Update Confirmation Modal, Archival code blocks, JSON Navigator).
  • Relationships Defect 2 (nested-interactive restructure) — moving the four <a> elements out of the root <g role=\"button\"> and extracting the nested <Link> from workflow-family-node-description.svelte's outer <button> are substantial SVG/HTML restructures that should ship in their own PR with careful visual review.

Test plan

  • Expand a workflow Accordion (failed-workflow stack trace, schedule advanced settings); confirm content reads correctly with no "edit text" announcement.
  • If a consumer puts a Button in <Accordion slot=\"action\">, it is reachable by Tab as a sibling of the disclosure trigger, not as a nested control.
  • On any CodeBlock with default copy enabled: the copy button announces as "Copy" (or translated equivalent); after click, "Copied".
  • On a Temporal server lacking Nexus capability: the Nexus nav item does not appear in side-nav or bottom-nav.
  • On Workflow Detail > Relationships: tab to the SVG family-tree nodes; AT announces "Workflow {id}: {status}" instead of bare "button".
  • pnpm exec playwright test tests/accessibility/ — axe rules button-name, aria-allowed-attr, nested-interactive, svg-img-alt should not flag the touched surfaces.

🤖 Generated with Claude Code

Five fixes under SC 4.1.2 Name, Role, Value:

- Accordion content panel: remove role="textbox". The disclosure
  panel is static content, not an editable text input; AT
  announced "edit text" on every Accordion consumer.
- Accordion + AccordionLight: move slot="action" out of the
  disclosure <button> into a sibling element. Previously
  consumers placing focusable content in the action slot
  produced <button><button>... nested-interactive HTML.
- CopyButton: ship translated default labels via i18n. Empty
  string defaults in CodeBlock previously propagated to an Icon
  that hid itself, producing unlabeled icon-only buttons across
  ~11 CodeBlock instances.
- nav-section: filter out hidden nav items. The NavLinkItem.hidden
  flag was declared on the type and set at source but never
  consulted at render time, so Standalone Activities / Nexus
  links rendered as focusable for AT users on servers that
  cannot serve them.
- Workflow family tree: add aria-label to the two SVG
  <g role="button"> widgets so screen readers announce node
  identity instead of "button".

Deferred to follow-up PRs (audit blockers):
- 4.1.2-button-anchor-empty: audit recommends a two-PR sequenced
  rollout (primitive change + consumer migration).
- 4.1.2-codemirror-no-name: ~5 CodeBlock consumer surfaces need
  design input on label content.
- relationships nested-interactive restructure: site B (button
  wraps Link) and site A's nested <a> extraction are substantial
  SVG/HTML restructures separate from the labeling fix above.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bilal-karim bilal-karim requested a review from a team as a code owner May 22, 2026 00:32
@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

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

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment May 22, 2026 12:33am

Request Review

@temporal-cicd
Copy link
Copy Markdown
Contributor

temporal-cicd Bot commented May 22, 2026

Warnings
⚠️

📊 Strict Mode: 12 errors in 4 files (1.3% of 914 total)

src/lib/holocene/code-block.svelte (6)
  • L146:32: 'editorView.contentHeight' is possibly 'undefined'.
  • L166:24: Type 'number | boolean' is not assignable to type 'boolean'.
  • L174:23: Type 'number | undefined' is not assignable to type 'number'.
  • L174:34: Type 'number | undefined' is not assignable to type 'number'.
  • L186:8: 'editorView' is possibly 'undefined'.
  • L285:30: Type 'boolean | 0' is not assignable to type 'boolean | undefined'.
src/lib/holocene/accordion/accordion.svelte (1)
  • L9:12: Argument of type '$$Props' is not assignable to parameter of type '{ title: string; id?: string | undefined; subtitle?: string | undefined; icon?: null | undefined; open?: boolean | undefined; expandable?: boolean | undefined; error?: string | undefined; onToggle?: (() => void) | undefined; class?: string | undefined; }'.
src/lib/holocene/accordion/accordion-light.svelte (2)
  • L23:12: This expression is not callable.
  • L6:12: Argument of type '$$Props' is not assignable to parameter of type '{ id?: string | undefined; open?: boolean | undefined; onToggle?: undefined; icon?: "search" | "link" | "success" | "error" | "action" | "activity" | "add-square" | "add" | "apple" | "archives" | ... 146 more ... | undefined; }'.
src/lib/components/workflow/relationships/workflow-family-node-tree.svelte (3)
  • L78:21: Parameter 'e' implicitly has an 'any' type.
  • L221:8: Type 'false | "[writing-mode:vertical-lr]"' is not assignable to type 'ClassValue | null | undefined'.
  • L228:25: 'child.siblingCount' is possibly 'undefined'.

Generated by 🚫 dangerJS against b143c08

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