Improve version copy accessibility#14131
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
✅ PR preview is ready!
|
3ae89ec to
29ff76b
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves the accessibility and keyboard navigation of the MainMenu's version footer by restructuring the DOM to comply with WAI-ARIA standards and removing a visual jitter effect.
Changes:
- Moved the version footer (containing the CopyButton) outside
role="menu"to fix WAI-ARIA violation - Added keyboard navigation support for the CopyButton via Tab/Shift+Tab/Escape
- Removed
transform: scale()animation that caused hover jitter on the copy button
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/app/src/components/MainMenu/styled-components.ts | Added StyledMenuPopoverContent wrapper, moved footer outside menu container, removed jittery scale transform |
| frontend/app/src/components/MainMenu/MainMenu.tsx | Restructured DOM hierarchy, added handleFooterKeyDown for keyboard navigation, updated Tab handling logic |
| frontend/app/src/components/MainMenu/MainMenu.test.tsx | Added comprehensive keyboard navigation tests for footer interactions |
| e2e_playwright/main_menu_test.py | Updated selectors to target popover instead of menu for version footer |
| e2e_playwright/theming/custom_theme_fonts_test.py | Updated selectors to target popover instead of menu for version footer |
Consolidated Code ReviewSummaryThis PR improves the accessibility and layout of the MainMenu's version footer by:
Files changed: 2 frontend source files, 1 frontend test file, 2 e2e test files (plus snapshot/CI updates). Code QualityBoth reviewers agreed the code is clean, well-structured, and follows established patterns:
Key Disagreement: Shift+Tab BehaviorThe main point of disagreement between reviewers was about Shift+Tab from menu items when the footer is present. gpt-5.3-codex-high flagged this as a blocking regression: when opus-4.6-thinking acknowledged the same behavior but considered it a deliberate, reasonable tradeoff, noting that users can always use Escape to dismiss. Resolution: After examining the code, I agree with opus-4.6-thinking. The popover uses Test CoverageBoth reviewers agreed that test coverage is good:
Both reviewers identified the same gap: There is no unit test for Shift+Tab from a menu item when the footer is present (verifying the menu stays open and focus moves to the CopyButton). The existing Shift+Tab close test only covers the no-footer case. This would complete the coverage matrix but is non-blocking. Backwards CompatibilityBoth reviewers agreed there are no API-level breaking changes. The only behavioral change is that Tab from the menu now requires two presses to close (one to reach the CopyButton, one to close). Escape still closes the menu in one press. No protobuf or Python changes beyond E2E test updates. Security & RiskBoth reviewers agreed: No security concerns. Regression risk is low — changes are well-scoped to the AccessibilityBoth reviewers agreed this is a net positive for accessibility:
Recommendations
VerdictAPPROVED: A well-implemented accessibility improvement that fixes a real WAI-ARIA violation, adds clean keyboard navigation for the footer CopyButton, and includes comprehensive test coverage. The Shift+Tab cycling behavior within the focus-locked popover is intentional and consistent with standard focus-lock semantics — not a regression. The two non-blocking suggestions (additional test case and clarifying comment) would further strengthen the PR but are not required for merge. Consolidated review by 📋 Review by `gpt-5.3-codex-high`SummaryThis PR improves the main menu's accessibility by moving the version footer (and its Code QualityThe refactor in One behavioral issue remains:
Test CoverageCoverage is generally good:
Gap identified:
Backwards CompatibilityNo API-level breaking changes were found. However, keyboard behavior changed for users navigating backwards with Security & RiskNo direct security concerns identified. AccessibilityPositive:
Concern:
Recommendations
VerdictCHANGES REQUESTED: The accessibility semantics fix is strong, but reverse keyboard navigation has a regression risk that should be resolved before merge. This is an automated AI review by 📋 Review by `opus-4.6-thinking`SummaryThis PR improves accessibility and layout of the version copy button in the
Files changed: 2 frontend source files, 1 frontend test file, 2 e2e test files. Code QualityThe code is well-structured, clean, and follows established patterns in the codebase:
Test CoverageFrontend unit tests — Good coverage of the new keyboard navigation scenarios:
Tests correctly use positive + negative assertions (e.g., Minor gap: There is no unit test for Shift+Tab from a menu item when the footer is present (i.e., verifying the menu stays open and focus moves to the CopyButton). The existing Shift+Tab close test at line 304 only covers the no-footer case ( E2E tests — Updated appropriately:
Backwards CompatibilityThis change is backwards compatible for end users:
Security & RiskNo security concerns identified. The changes are purely in the frontend presentation layer and keyboard navigation logic. No new data flows, network calls, or state management changes. Regression risk is low: The changes are well-scoped to the AccessibilityThis PR is a net positive for accessibility:
Recommendations
Both suggestions are minor improvements and are not blocking. VerdictAPPROVED: A well-implemented accessibility improvement that fixes a real WAI-ARIA violation, adds clean keyboard navigation for the footer CopyButton, and includes comprehensive test coverage. The code is clean, follows existing patterns, and introduces no regressions. This is an automated AI review by |
Describe your changes
Improves accessibility and layout of the version copy button in the
MainMenufooter.role="menu": TheStyledMenuVersionFooter(containing theCopyButton) is now a sibling ofStyledMenuContainerrather than a child. This fixes a WAI-ARIA violation where an interactive button was nested insiderole="menu"without being amenuitem. A newStyledMenuPopoverContentwrapper owns the outer padding andminWidthfor both the menu and footer.CopyButton(via focus-lock), then a second Tab closes the popover. Escape from theCopyButtonalso closes the popover. Shift+Tab returns focus to the menu.transform: scale(0.9)→scale(1)transition that caused visual jitter on hover. The button now fades in with a clean opacity transition only.Testing Plan