Repository navigation
fix(apollo-vertex): give select example trigger an accessible name - #1389
Conversation
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.
There was a problem hiding this comment.
🟢 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.
Dependency License Review
License distribution
Excluded packages
|
📊 Coverage + size by packagePer-package bundle size on this PR (no JS/TS source changes detected under
"Coverage" is each package's own |
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 |
Summary
lintapple flagged the first
SelectTriggeron/preview/components/selectwith axebutton-nameat every viewport. This PR associates aLabelwith the trigger in the preview example and the usage snippet.Root cause
Radix Select (
@radix-ui/react-select2.2.6) renders the trigger as<button type="button" role="combobox">. Placeholder and value text are present in the DOM (the value span only haspointer-events: none, noaria-hidden), but in ARIA acomboboxis not named from content. axe'sbutton-namerule runs on everybuttonelement, and its accessible-text computation returns no text from a combobox's subtree. So the trigger only gets a name fromaria-label,aria-labelledbyor an associated<label>.I reproduced this with axe-core 4.11 in vitest + jsdom against the vertex
Select:button-nameviolationdefaultValue): still abutton-nameviolation, so this is not about the placeholder<Label htmlFor>+SelectTrigger id: no violationaria-labelon the trigger: no violationThe 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
<Label htmlFor="fruit">Fruit</Label>andid="fruit"on the trigger.Labelto the import and pair it with the trigger, so copy-paste usage is accessible too.Verification
pnpm --filter apollo-vertex lint,typecheck,format:checkpasspnpm --filter apollo-vertex buildpasses, and the prerenderedcomponents/select.htmlcontains<label for="fruit">followed by<button role="combobox" id="fruit">