Skip to content

More aria attributes for Selectable - #3583

Merged
myasonik merged 4 commits into
elastic:feature/selectable-a11yfrom
myasonik:selectable-a11y/more-aria
Jun 15, 2020
Merged

myasonik merged 4 commits into
elastic:feature/selectable-a11yfrom
myasonik:selectable-a11y/more-aria

Conversation

@myasonik

@myasonik myasonik commented Jun 9, 2020

Copy link
Copy Markdown
Contributor

Summary (3 things)

  1. Adds aria-setsize and aria-posinset attributes to the options (gives accurate sizes and positions to screen readers in virtualized lists)
  2. Adds the messages (e.g., "no results found") as an aria-describedby to the search field
  3. When clicking on an option, it would set focus on the first focusable option. Now, instead, it sets it on the option you clicked which prevents a weird jump and seems to just work better. (Breaking change: needed to pass around another function for this)

Reviewer note: Each of these is a single commit if you want to review that way.

Checklist

  • Checked for breaking changes and labeled appropriately
  • Checked for accessibility including keyboard-only and screenreader

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile
- [ ] Checked in IE11 and Firefox
- [ ] Props have proper autodocs
- [ ] Added documentation
- [ ] Checked Code Sandbox works for the any docs examples
- [ ] Added or updated jest tests
- [ ] A changelog entry exists and is marked appropriately

@myasonik myasonik added breaking change PRs with breaking changes. (Don't delete - used for automation) accessibility labels Jun 9, 2020
@myasonik myasonik changed the title More More aria attributes for Selectable Jun 9, 2020
@kibanamachine

Copy link
Copy Markdown
Contributor

@thompsongl
thompsongl self-requested a review June 15, 2020 16:32

@thompsongl thompsongl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kibanamachine

Copy link
Copy Markdown
Contributor

@myasonik
myasonik merged commit 0e168f2 into elastic:feature/selectable-a11y Jun 15, 2020
@myasonik
myasonik deleted the selectable-a11y/more-aria branch June 15, 2020 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility breaking change PRs with breaking changes. (Don't delete - used for automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants