-
Notifications
You must be signed in to change notification settings - Fork 96
fix(designer): Improve toolbar accessibility with dynamic tabIndex and ARIA attributes #8727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
✅ Risk Level
✅ What & Why
✅ Impact of Change
✅ Test Plan
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | None — keep as-is. |
| Commit Type | ✅ | None — correct. |
| Risk Level | ✅ | None — matches label. |
| What & Why | ✅ | Add one-line rationale for the * 2 in the formula. |
| Impact of Change | ✅ | Optional: reference large-workflow test in this section. |
| Test Plan | ✅ | Add a TODO/follow-up for Firefox E2E coverage. |
| Contributors | Add contributor credits (optional). | |
| Screenshots/Videos | ✅ | Ensure attachment link is accessible; consider embedding a small GIF or thumbnail. |
Final Notes and Actionable Recommendations
This PR meets the repository's PR-body template and contains appropriate unit and E2E tests. The labels and chosen risk level are consistent with the code changes and the advised risk level remains risk:medium.
Please consider the following small updates before merging (none are blocking):
- In "What & Why", add a short explanation of why nodes are multiplied by 2 in the tabIndex formula so reviewers can quickly understand the mapping to nodeIndex/nodeLeafIndex semantics.
- Add a short TODO or issue reference in the Test Plan noting that E2E tests are currently skipped for Firefox and should be addressed (or explain why Firefox is intentionally excluded).
- Optionally list contributors in the Contributors section to credit reviewers/PM/Design.
- Confirm that the screenshot/video attachment is accessible to reviewers; if not, include a brief inline GIF or screenshot.
Thanks — this is a well-structured PR with good test coverage for an accessibility fix. Please update the minor suggestions above if you want them addressed before merging.
Last updated: Fri, 23 Jan 2026 22:36:50 GMT
…trotrejo/toolBarA11y
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates the designer’s control toolbar to improve layering/semantics and to place toolbar controls after workflow elements in the tab sequence.
Changes:
- Add a
tabIndexprop toCollapseExpandControland pass a computedtabIndexto all toolbar buttons. - Compute a “toolbar last”
tabIndexbased on current node/edge counts viauseNodes/useEdges. - Add toolbar semantics (
role="toolbar") and adjust CSS stacking viaz-index.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| libs/designer/src/lib/ui/styles.less | Raises toolbar stacking (z-index) so tools appear above the canvas. |
| libs/designer/src/lib/ui/common/controls/collapseExpandControl.tsx | Adds optional tabIndex support for the expand/collapse button. |
| libs/designer/src/lib/ui/Designer.tsx | Adds toolbar ARIA semantics for the controls container. |
| libs/designer/src/lib/ui/Controls.tsx | Computes a toolbar tabIndex from workflow element counts and applies it to all control buttons. |
|
📊 Coverage check completed. See workflow run for details. |
1 similar comment
|
📊 Coverage check completed. See workflow run for details. |
…ndex - Add unit tests for Controls.tsx tabIndex calculation logic - Verify formula: (nodes * 2) + edges + 1 - Test edge cases: empty workflow, nodes only, edges only, large workflows - Verify all toolbar buttons receive same tabIndex - Extend E2E tabFocus.spec.ts with toolbar navigation tests - Verify toolbar is focusable after tabbing through workflow elements - Test tab order through all toolbar controls - Verify keyboard activation (Enter/Space) for toolbar buttons - Test toolbar focus after closing node panel
- Replace useNodes/useEdges with useStore selectors for counts only - Prevents toolbar re-renders on node/edge drag/move operations - Fix misleading comment about z-index and tab order
|
📊 Coverage check completed. See workflow run for details. |
|
📊 Coverage check completed. See workflow run for details. |
|
📊 Coverage check completed. See workflow run for details. |
|
📊 Coverage check completed. See workflow run for details. |
Commit Type
Risk Level
What & Why
This PR improves the keyboard navigation and accessibility of the designer toolbar controls. Previously, toolbar buttons could receive focus before workflow elements, making it confusing for keyboard users to navigate the designer.
Changes Made:
Dynamic tabIndex calculation (
Controls.tsx):useStorehook from@xyflow/reactto get node and edge counts(nodes * 2) + edges + 1to ensure toolbar controls receive focus after all workflow elementsuseMemofor performance optimizationARIA attributes (
Designer.tsx):role="toolbar"andaria-label="Designer controls"to the toolbar container for proper screen reader identificationCollapseExpandControl enhancement (
collapseExpandControl.tsx):tabIndexprop interfacetabIndexto the underlyingControlButtonCSS z-index fix (
styles.less):z-index: 5to.msla-designer-toolsto ensure the toolbar is above the canvas for proper visual stacking and click/focus hit-testingUnit tests (
Controls.spec.tsx):E2E tests (
tabFocus.spec.ts):Should focus toolbar controls after workflow elementsShould focus toolbar controls after closing panelShould be able to tab through all toolbar controlsShould activate toolbar controls with keyboardImpact of Change
CollapseExpandControlcomponent now accepts an optionaltabIndexprop for custom tab order control.Test Plan
Contributors
Screenshots/Videos
CleanShot.2026-01-23.at.13.29.01.mp4