Repository navigation
fix(site/src): expose organization picker as a combobox - #30402
Merged
Merged
Conversation
The organization picker trigger was a plain button, so screen readers announced only its label and never the selected organization. Give it role="combobox" so assistive technology exposes the selection as the control's value, and label the unlabeled Spend page picker since a combobox does not take its name from its contents.
jaaydenh
approved these changes
Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The organization picker trigger (
OrganizationAutocomplete) was a plain<button>that opens a popup. It has no value, so screen readers announced only its label ("Organization") and never the selected organization. Deque flagged this on Create User (/deployment/users/create) under WCAG 4.1.2, rulecustom-combobox.This PR gives the trigger
role="combobox". It follows the APG combobox pattern, which the RadixSelecttriggers (e.g. "Login type" on the same page) andModelSelectoralready use. With the role in place:aria-expanded,aria-required, andaria-haspopup="dialog"are valid on the control.aria-requiredisn't allowed on a button.aria-controlspoints at the popover through an id the component owns (useId), whichjsx-a11y/role-has-required-aria-propsrequires.A combobox doesn't take its accessible name from its contents. The one caller without a label, the Spend page picker shown when no organization is resolved, now passes
ariaLabel="Organization"so it keeps a name. Every other caller already has a<Label htmlFor>or anariaLabel.Tests that queried the trigger by
buttonrole now usecombobox. That includesqueryByRole(...).not.toBeInTheDocument()checks, which would otherwise pass without checking anything. TheOrganizationAutocompleteandCreateUserFormstories now assert the role,aria-expanded,aria-controls, and the exposed value.Proof
The control looks the same, so here is Chromium's accessibility tree (via CDP
Accessibility.getFullAXTree), which is what NVDA reads in Chrome:buttoncomboboxDecision log
<select>. That keeps the search box and avatars, and it matches the existing RadixSelectandModelSelectortriggers.aria-haspopup="dialog"from Radix. ARIA 1.2 allows a dialog popup for a combobox, and the popover holds a search input plus a listbox.ariaLabel(e.g. "Organization My Org") will now hear the name twice, once in the label and once as the value.ModelSelectoralready does this, so it's left for a follow-up to keep this PR small.Validation: full Storybook suite (3,703 tests), the affected unit tests,
make lint/ts, andmake fmt/ts.Generated by Coder Agents on behalf of @chrifro.