Conversation
|
4740d11 to
db495b3
Compare
| }} | ||
| onShowContent={(event) => this.handleToggle(event, true)} | ||
| mountNode={mountNode} | ||
| mountNode={mountNode || this.ref} |
There was a problem hiding this comment.
This solution is based on mounting the DrillDown to the component (not to document.body), allowing us to navigate back from the first item to the trigger button itself.
There was a problem hiding this comment.
we should mention this in the release notes, it might break stuff for users
| 'aria-label': `${item.label} menu` | ||
| }} |
There was a problem hiding this comment.
Réka said "open for" is unnecessary and confusing here.
| alignItems: 'stretch', | ||
| justifyContent: 'space-between', | ||
| height: componentTheme.desktopHeight, | ||
| position: 'relative', |
There was a problem hiding this comment.
these positions and overflows needed to be modified now that Drilldown is no longer mounted to the end of the document, otherwise the styling breaks
There was a problem hiding this comment.
Pull Request Overview
This PR fixes keyboard navigation and focus issues in both the Drilldown and TopNavBar components. Key changes include:
- Updating style rules (changing overflow properties) to prevent focus ring cropping.
- Adjusting aria-labels in the TopNavBar to improve accessibility.
- Modifying Drilldown behavior to focus the first available item on keyboard invocation and improving mountNode handling.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui-top-nav-bar/src/TopNavBar/TopNavBarMenuItems/styles.ts | Adds 'overflow: visible' to prevent focus ring cropping |
| packages/ui-top-nav-bar/src/TopNavBar/TopNavBarLayout/DesktopLayout/styles.ts | Changes overflow from hidden to visible and removes an unneeded relative positioning |
| packages/ui-top-nav-bar/src/TopNavBar/README.md | Updates aria-label text for better accessibility semantics |
| packages/ui-drilldown/src/Drilldown/props.ts | Updates mount node documentation to reflect new default behavior |
| packages/ui-drilldown/src/Drilldown/index.tsx | Implements keyboard focus handling and adjusts mountNode fallback |
| as="div" | ||
| elementRef={this.handleDrilldownRef} | ||
| tabIndex={0} | ||
| css={styles?.drilldown} |
There was a problem hiding this comment.
We no longer need to focus the entire Popover—just the first item—so this part was removed.
db495b3 to
d4c4b4f
Compare
|
|
||
| {...item.submenu && { | ||
| renderSubmenu: this.generateSubmenu(item), | ||
| 'aria-label': `Open for ${item.label} menu` |
There was a problem hiding this comment.
Réka said aria-label is unnecessary hin these places and advised to remove them
| {!this.hasBreadcrumbBlock && !trayMountNode && ( | ||
| <div css={styles?.trayContainer} id={this._trayContainerId} /> | ||
| )} | ||
|
|
There was a problem hiding this comment.
I moved this code after line 466 so that when I'm on the first item of the drill-down menu with SR and step back, the focus returns to the Drilldown's trigger, thereby exiting the DrillDown.
| focusFirstAvailableItem( | ||
| event?: |
There was a problem hiding this comment.
this handles the focus in SmallPortView
…avBar's keyboard navigation issues INSTUI-4494
37aabb7 to
4fe3cea
Compare
HerrTopi
left a comment
There was a problem hiding this comment.
Now it seems fine to me. Good work
matyasf
left a comment
There was a problem hiding this comment.
When I use only keyboard in the playground's smallViewport mode and go into the Admin menu, thew whole menu is selected, is this OK?
…board navigation issues
INSTUI-4494
ISSUES:
TEST PLAN:
with keyboard navigation only (no screenreader):
with VoiceOver:
with JAWS/NVDA:
with iOS VoiceOver: