Repository navigation
fix(widget): keep the closed popup out of the tab order and close it with escape - #173
Merged
Merged
Conversation
anurag629
approved these changes
Oct 19, 2026
anurag629
left a comment
Member
There was a problem hiding this comment.
Thanks @prakashNalla, this does everything #59 asks. On top of current dev, build, typecheck and all 321 tests pass, and your five popup tests fail without the change. In Chrome the closed panel is inert and hidden, Tab goes from the page to the launcher and skips the panel, opening it puts focus in the input with aria-expanded="true", and Escape closes it and puts focus back on the launcher. The fade still works, and inline mode is unchanged. Merging.
This was referenced Oct 20, 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this change?
In popup mode the closed panel and the hidden welcome bubble now have
inertandaria-hidden="true", removed when they show, so they're out of the tab order and the accessibility tree. The popup panel is arole="dialog"with the branding name asaria-label, Escape inside it closes it, and if focus was inside the panel when it closes it goes back to the FAB. The FAB hasaria-expandedandaria-controls="cc-panel". Inline mode gets none of this and works as before.Closes #59
How I tested this
pnpm -r build,pnpm -r typecheckandpnpm test(30 files / 309 tests pass), on Node v22.23.3 with pnpm 9.15.0panel.test.ts,fab.test.tsandwidget.test.tsfor the panel and bubble attributes, the FAB'saria-expanded/aria-controls, Escape closing the popup with focus back on the FAB, and the inline panel staying as it was. The 5 popup ones fail without the change.dev.htmlin headless Chrome and pressed Tab through the page. With the popup closed, Tab goes from the page buttons to the FAB and the bubble's dismiss button, and skips the panel. After opening it, Tab reaches the panel's close button and the form. Escape closed it and focus was back on the FAB. The panel still fades in and out (opacity read 0.59 mid-close). In?mode=inlineTab goes through the inline form as before.AI assistance
Claude helped me understand the core issue.
Checklist
devpnpm -r build,pnpm testandpnpm -r typecheckpass locallypnpm changeset) if this changescore,widgetorserver