Repository navigation
fix(site/src/modules/dashboard/Navbar/UserDropdown): hide the AI spend bar from the profile menu's accessibility tree - #32023
Merged
Conversation
…d bar from the profile menu's accessibility tree The profile menu (role=menu) rendered the AI spend UsageBar (role=progressbar) as a direct child, which axe reports as aria-required-children. The spend, limit, and period are already exposed as text, so the bar is now aria-hidden.
jeremyruppel
approved these changes
Nov 12, 2026
jeremyruppel
temporarily deployed
to
docs-preview
November 12, 2026 22:32 — with
GitHub Actions
Inactive
This branch was previously deployed
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 profile menu (
role="menu") rendered the AI spendUsageBar(role="progressbar") as a direct child. A menu cannot own a progressbar, so axe reportsaria-required-childrenon the menu. The bar now sits inside anaria-hiddenwrapper. The spend, limit, and period are still exposed as text, and the avatar trigger's accessible name already carries the warning and exceeded state.There is no visual change: before and after screenshots of
UserDropdown/WithAISpendwith the menu open are byte-identical, so no screenshots are attached. The existing AI spend stories now query the progressbar withhidden: true.Closes DEQ-307
Grouping and decision log
aria-required-childrenhas two eligible tickets, with two root causes.[role=progressbar]) is this PR.nav) was already fixed onmainby fix(site/src/modules/dashboard/Navbar): own admin settings menu items directly by the menu #31635, which listed only thearia-required-parenttickets in itsCloseslines. axe reports 0 violations for it onmain, so it went to a human to close.DropdownMenuGroup(role="group"). axe 4.11 looks through groups inside a menu, and the progressbar stayed flagged.DropdownMenuItem, normal or disabled. That would present it as a command with no action, or as an unavailable one that Radix skips, and it changes hover and focus styling.role="menu". That is cleaner for a rich account panel but is a structural change beyond this fix. Tradeoff: the spend text is in the accessibility tree but not reachable with menu arrow keys. That is unchanged frommain.UserDropdownstories with the menu open:main: 1aria-required-childrenviolation in each story that renders the bar (WithAISpend,AISpendWarning,AISpendExceeded).WithAISpend,AISpendWarning,AISpendAtLimit,AISpendExceeded,AISpendZeroSpend,AISpendZeroLimit,AISpendUnlimited, andUserDropdown.landmark-one-main,page-has-heading-one,region) are story-isolation artifacts.frontend-reviewfound nothing.frontend-deep-reviewraised CD4 (the comment overstated the ARIA rule) and it is fixed; the other finding was an RO3 nit, below.frontend-accessibilityfound nothing blocking.playfunctions): the pattern predates this PR. This PR only changes the query options in them.🤖 Generated by Coder Agents on behalf of @bartekgatzcoder.