Skip to content

Please don't add help text to live region when combobox drops down #1244

@carmacleod

Description

@carmacleod

Remove the a11y status message functionality from the hooks

  • remove getA11yStatusMessage from useSelect.
  • remove getA11ySelectionMessage from useSelect.
  • remove getA11yStatusMessage from useCombobox.
  • remove getA11ySelectionMessage from useCombobox.
  • remove getA11yRemovalMessage from useMultipleSelection.
  • check that status message still works in Downshift.
  • update documentation to instruct developers to use onStateChange and any aria-live technique if they wish to maintain the previous functionality.
  • merge to v9 branch with migration guide updated.

Original Message:

Please do not add the following "help/hint text" to the a11y-status-message live region when a combobox is dropped down:

"6 results are available, use up and down arrow keys to navigate. Press Enter key to select."

Screen reader users can usually turn off the help/hint text for their screen reader (as soon as they become proficient with it) in order to reduce verbosity, and since they wouldn't be able to turn this off, it would get annoying pretty quickly. :)

Regarding "6 results are available":

  • Browsers are required to calculate aria-setsize and aria-posinset for things like options in a listbox. This allows AT to say things like "Beans, 3 of 6", "Rice, 4 of 6". So this info is already available to the screen reader user.

Regarding "use up and down arrow keys to navigate. Press Enter key to select.":

  • role="combobox" communicates this fully without adding any words, i.e. as soon as the user hears "combobox", they already know to use up/down arrow and enter (plus some other keys as well, like home/end).

Please also see this comment, which contains screen reader output showing that this particular live region content is verbose and unnecessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions