Skip to content

fix(apollo-vertex): give select example trigger an accessible name - #1389

Merged
ruudandriessen merged 1 commit into
mainfrom
fix/vertex-select-trigger-name
Oct 16, 2026
Merged

ruudandriessen merged 1 commit into
mainfrom
fix/vertex-select-trigger-name

Conversation

@ruudandriessen

Copy link
Copy Markdown
Collaborator

Summary

lintapple flagged the first SelectTrigger on /preview/components/select with axe button-name at every viewport. This PR associates a Label with the trigger in the preview example and the usage snippet.

Root cause

Radix Select (@radix-ui/react-select 2.2.6) renders the trigger as <button type="button" role="combobox">. Placeholder and value text are present in the DOM (the value span only has pointer-events: none, no aria-hidden), but in ARIA a combobox is not named from content. axe's button-name rule runs on every button element, and its accessible-text computation returns no text from a combobox's subtree. So the trigger only gets a name from aria-label, aria-labelledby or an associated <label>.

I reproduced this with axe-core 4.11 in vitest + jsdom against the vertex Select:

  • placeholder only: button-name violation
  • with a selected value (defaultValue): still a button-name violation, so this is not about the placeholder
  • <Label htmlFor> + SelectTrigger id: no violation
  • aria-label on the trigger: no violation

The component does nothing wrong. The doc example simply had no label. A component-level fix isn't possible because the component can't make up a meaningful name, so the fix belongs in the example.

Changes

  • Preview: wrap the select in a column with <Label htmlFor="fruit">Fruit</Label> and id="fruit" on the trigger.
  • Usage snippet: add Label to the import and pair it with the trigger, so copy-paste usage is accessible too.

Verification

  • pnpm --filter apollo-vertex lint, typecheck, format:check pass
  • pnpm --filter apollo-vertex build passes, and the prerendered components/select.html contains <label for="fruit"> followed by <button role="combobox" id="fruit">

Radix renders SelectTrigger as <button role="combobox">. Combobox is not
named from content, so the placeholder or selected value text never names
it and axe reports button-name even after a value is chosen. Associate a
Label with the trigger in the preview and the usage snippet.
@ruudandriessen
ruudandriessen requested a review from a team as a code owner October 16, 2026 11:43
@ruudandriessen
ruudandriessen requested review from KokoMilev and alincadariu and a balanced review from Copilot October 16, 2026 11:43
@github-actions github-actions Bot added the size:M 30-99 changed lines. label Oct 16, 2026
@github-actions
github-actions Bot temporarily deployed to preview/apollo-vertex October 16, 2026 11:44 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-design October 16, 2026 11:44 Destroyed
@github-actions
github-actions Bot temporarily deployed to preview/apollo-landing October 16, 2026 11:44 Destroyed

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.

🟢 Approval recommended

Label associations correctly match the trigger IDs, and the documentation-only change has no identified blocking issues.

0 open findings

What changed in this PR

Fixes accessible names for the Select documentation examples in Apollo Vertex.

Changes:

  • Associates a visible “Fruit” label with the preview trigger.
  • Adds a matching label and import to the usage snippet.
File Description
apps/​apollo-vertex/​content/​docs/​components/​select.mdx Labels Select triggers in the preview and usage example.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions
github-actions Bot temporarily deployed to preview/apollo-docs October 16, 2026 11:44 Destroyed
@github-actions

Copy link
Copy Markdown
Contributor

Dependency License Review

  • ✅ 1947 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1713
ISC 91
Apache-2.0 56
BSD-3-Clause 28
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.3.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage + size by package

Per-package bundle size on this PR (no JS/TS source changes detected under packages/* or web-packages/*).

Package Coverage New-line coverage Packed (gzip) Unpacked vs main
@uipath/apollo-core — — — — —
@uipath/apollo-react — — — — —
@uipath/apollo-ui-icons — — — — —
@uipath/apollo-vertex — — 325.9 KB 1.84 MB +1 B
@uipath/apollo-wind — — — — —
@uipath/ap-chat — — — — —

"Coverage" is each package's own coverage.include scope (e.g. apollo-core instruments only scripts/). "Packed"/"Unpacked" come from npm pack --dry-run and only cover built packages — "—" means not measured this run (package not affected / not built). "vs main" is the packed (gzipped) delta against the last successful main build (the package-sizes artifact from the Release workflow); "—" there means no main baseline was available this run. The baseline is main's latest build, not this PR's exact merge-base, so it includes any drift since the branch diverged. Packages with no vitest config are omitted.

@github-actions

Copy link
Copy Markdown
Contributor

Storybook visual diff

✅ No stories are affected by this PR's changes; nothing to compare. Logs

Updated (PT): Oct 16, 2026, 04:53:46 AM

@ruudandriessen
ruudandriessen merged commit 603f4db into main Oct 16, 2026
44 of 45 checks passed
@ruudandriessen
ruudandriessen deleted the fix/vertex-select-trigger-name branch October 16, 2026 12:04

This branch was successfully deployed

No deployments
preview/apollo-docs — 963f8abe Deployed Oct 16, 2026 by github-actions[bot]
preview/apollo-landing — 963f8abe Deployed Oct 16, 2026 by github-actions[bot]
preview/apollo-design — 963f8abe Deployed Oct 16, 2026 by github-actions[bot]
preview/apollo-vertex — 963f8abe Deployed Oct 16, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:apollo-vertex size:M 30-99 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants