Skip to content

Commit

Permalink
Navigable regions: skip empty regions
Browse files Browse the repository at this point in the history
  • Loading branch information
stokesman committed Jul 18, 2024
1 parent 44e17be commit 5eaa222
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function useNavigateRegions( shortcuts: Shortcuts = defaultShortcuts ) {
function focusRegion( offset: number ) {
const regions = Array.from(
ref.current?.querySelectorAll< HTMLElement >(
'[role="region"][tabindex="-1"]'
'[role="region"][tabindex="-1"]:not(:empty)'
) ?? []
);
if ( ! regions.length ) {
Expand Down

0 comments on commit 5eaa222

Please sign in to comment.