Include the result name in the aria label#955
Conversation
|
That CI fail doesn't look like my fault 👍 |
|
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 |
|
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? |
|
I've given it a shot and francoischalifour/autocomplete.js#51 is a result of updating |
|
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) |
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.