Skip to content

Add keyboard usage instructions to screen reader popover dialogue #5813

@cee-chen

Description

@cee-chen

Per Zuhair's EuiPopover recommendation in #5784 (comment):

I would suggest [...] adding context specific text (if possible) advising what the user needs to do to get to the first focusable element (like pressing the tab key, using the arrows etc.). If there are no focusable elements, then the text should naturally not be spoken. This should at least prompt the user to initiate action to interact with the popover, letting them know that they don't have to listen to the entire content.

Generally, EuiPopovers should use the tabbable library to check if there are tabbable elements, and also if ownFocus is true on the popover (otherwise tab will not behave as expected). If both conditions are met, an additional dialogue sentence should be added instructing screen readers to use the Tab key to reach the first interactable element.

Special components that will need specific instructions:

  • EuiTour - does not apparently use ownFocus, should be double checked to confirm no tab instructions read out
  • EuiSelectableTemplateSitewide - tab key closes popover, up/down arrow keys should be used
  • EuiComboBox - tab key closes popover, up/down arrow keys should be used
  • EuiSuggest - tab key closes popover, up/down arrow keys should be used
  • EuiSuperSelect - tab key does nothing, up/down arrow keys should be used
  • EuiRange/EuiDualRange with EuiInputPopover - tab key does nothing, up/down arrow keys should be used
  • EuiAutoRefresh with EuiInputPopover - tab key behaves weirdly and should not be used(?)
  • EuiContextMenu - tab key and up/down arrow keys can be used (eventually tab might be removed)
  • EuiSearchBar tags dropdown(?) - user must tab into EuiSelectable, confirm EuiSelectable reads out arrow key navigation

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions