popover_menus: Extend arrow based navigation to tabbable components.

Instead of only checking for visible `a` tags, we should also check
for visible elements with the `tabindex=0` attribute defined. This
allows us to support navigation for other components which we
explicitly set to be tabbable.
This commit is contained in:
Sayam Samal 2024-03-20 01:25:00 +05:30 committed by Tim Abbott
parent d469d37d14
commit 51ed6a4d7b
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ function get_popover_items_for_instance(instance: PopoverInstance): JQuery | und
return undefined;
}
return $current_elem.find("a:visible");
return $current_elem.find("a, [tabindex='0']").filter(":visible");
}
export const default_popover_props: Partial<PopoverProps> = {