Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 8bd74f5

Browse files
authored
Handle up/down as well as left/right for horizontal toolbars for improved a11y (#12305)
Signed-off-by: Michael Telatynski <[email protected]>
1 parent 942fabc commit 8bd74f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/accessibility/Toolbar.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ const Toolbar = forwardRef<HTMLDivElement, IProps>(({ children, ...props }, ref)
5353
}
5454
};
5555

56+
// We handle both up/down and left/right as is allowed in the above WAI ARIA best practices
5657
return (
57-
<RovingTabIndexProvider handleHomeEnd handleLeftRight onKeyDown={onKeyDown}>
58+
<RovingTabIndexProvider handleHomeEnd handleLeftRight handleUpDown onKeyDown={onKeyDown}>
5859
{({ onKeyDownHandler }) => (
5960
<div {...props} onKeyDown={onKeyDownHandler} role="toolbar" ref={ref}>
6061
{children}

0 commit comments

Comments
 (0)