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

Include the result name in the aria label #955

Closed
wants to merge 2 commits into from
Closed

Conversation

orta
Copy link

@orta orta commented May 28, 2020

Summary

When you use a screen reader with the search box, you only hear "Link to the result" for each result - which means you don't know what the result is. This adds the text of the result to the label so that folks can hear it.

@orta
Copy link
Author

orta commented May 28, 2020

That CI fail doesn't look like my fault 👍

@Haroenv
Copy link
Contributor

Haroenv commented Jun 1, 2020

This looks like an interesting fix, thanks! We are just on the doorstep of releasing the next version of docsearch. The code for that is available here https://github.com/algolia/docsearch/tree/next and @francoischalifour will be available to help you with setting up

@francoischalifour
Copy link
Member

The new code is actually on this repo for now. You can learn more about this version in facebook/docusaurus#2815.

We didn't yet do an accessibility audit but I believe this fix also needs to be done for the next version. Would you be interested in porting this fix there @orta?

@orta
Copy link
Author

orta commented Jun 22, 2020

I've given it a shot and francoischalifour/autocomplete.js#51 is a result of updating

@orta orta closed this Jun 22, 2020
@orta
Copy link
Author

orta commented Jul 14, 2020

While the PR above seems blocked and on the off-chance someone else hits the same issue, I ended up instead removing the aria label completely (which means the screen reader will use the result text anyway) and then have a few other quick tweaks to make it work better in the different keyboard mode with the screen reader active.

You can find the most up to date version of that script here (commit locked)

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.

3 participants