File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -278,10 +278,10 @@ const VerticalDivider: React.FC<React.PropsWithChildren<DividerProps & Draggable
278
278
279
279
function handleKeyDrag ( event : KeyboardEvent ) {
280
280
let delta = 0
281
- // Hardcoded a delta for every key press to move the splitter. Should I perhaps expose this as a prop?
282
- if ( event . key === 'ArrowLeft' && currentWidth > minWidth ) {
281
+ // https://github.com/github/accessibility/issues/5101#issuecomment-1822870655
282
+ if ( ( event . key === 'ArrowLeft' || event . key === 'ArrowDown' ) && currentWidth > minWidth ) {
283
283
delta = - 3
284
- } else if ( event . key === 'ArrowRight' && currentWidth < maxWidth ) {
284
+ } else if ( ( event . key === 'ArrowRight' || event . key === 'ArrowUp' ) && currentWidth < maxWidth ) {
285
285
delta = 3
286
286
} else {
287
287
return
@@ -349,7 +349,6 @@ const VerticalDivider: React.FC<React.PropsWithChildren<DividerProps & Draggable
349
349
aria-label = "Draggable pane splitter"
350
350
aria-valuemin = { minWidth }
351
351
aria-valuemax = { maxWidth }
352
- aria-orientation = "vertical"
353
352
aria-valuenow = { currentWidth }
354
353
aria-valuetext = { `Pane width ${ currentWidth } pixels` }
355
354
tabIndex = { 0 }
You can’t perform that action at this time.
0 commit comments