Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix / Read title while searching (accessibility) #487

Merged
merged 4 commits into from
Apr 18, 2024

Conversation

langemike
Copy link
Collaborator

@langemike langemike commented Apr 8, 2024

This change causes the screen reader to announce the outcome of your search query while your type, to provide convenience for screen reader users. You could consider this a pragmatic typeahead implementation.

Because aria-live="polite" is used it is announced after you performed a keystroke.

Good to know:

  • I also applied aria-liveto the <ErrorPage> so that title is also announced. Adding this also made me realize it can also be beneficial in other cases where ErrorPage get rendered.
  • I needed to prevent the announcement of placeholder data while you type. I did that by applying two isFetching-conditions. Though, I think it's more logical to render the placeholder data based on the isFetching-state itself instead of !!query. Something to improve in the future.

This change is based on feedback we got from our internal accessibility auditor. He noted the following:

Visually Impaired Home Screen reader does not automatically announce the typeahead search results. Screen reader should automatically announce the typeahead search results.

@langemike langemike marked this pull request as ready for review April 8, 2024 15:24
@langemike langemike force-pushed the fix/a11y-search-typeahead branch 2 times, most recently from fe9cd38 to 0fa2b70 Compare April 8, 2024 15:44
@langemike
Copy link
Collaborator Author

I forgot to look at the e2e tests. They should be fixed now

@AntonLantukh AntonLantukh merged commit f872594 into jwplayer:develop Apr 18, 2024
8 of 9 checks passed
@royschut royschut deleted the fix/a11y-search-typeahead branch April 18, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants