[Accessibility] Add hotkeys PageUp and PageDown for list navigation (#39252)
This commit is contained in:
1 parent
65622a52e1
commit
ce3fdf73f3
5 files changed
+39
-21
No files matched your search
@@ -159,13 +159,12 @@ export function focusItemSibling(index: number, direction: 1 | -1) {
|
||||
);
|
||||
|
||||
if (!siblingItem) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
// If sibling element is empty, we skip it
|
||||
if (siblingItem.matches(':empty')) {
|
||||
focusItemSibling(index + direction, direction);
|
||||
return;
|
||||
return focusItemSibling(index + direction, direction);
|
||||
}
|
||||
|
||||
// Check if the sibling is a post or a 'follow suggestions' widget
|
||||
@@ -184,5 +183,8 @@ export function focusItemSibling(index: number, direction: 1 | -1) {
|
||||
});
|
||||
|
||||
targetElement.focus();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user