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

Add valid labels for search button and input fields (a11y issue) #678

Open
Tracked by #8706
batpigandme opened this issue Apr 18, 2022 · 4 comments
Open
Tracked by #8706
Assignees
Labels
accessibility bug Something isn't working search upstream Bug is in upstream library
Milestone

Comments

@batpigandme
Copy link
Contributor

batpigandme commented Apr 18, 2022

Both the collapsed and expanded search features (the button, and then the input field) currently have aria-labelledby properties set that reference an element that doesn't exist (and, thus, they have no label)

<div class="aa-Autocomplete" role="combobox" aria-expanded="false" aria-haspopup="listbox" aria-labelledby="autocomplete-0-label">
<button class="aa-DetachedSearchButton">
...
</button>
</div>

There are three associated accessibility issues I get related to the search:

  1. ARIA input fields must have an accessible name
    Element: <div class="aa-Autocomplete" role="combobox" aria-expanded="false" aria-haspopup="listbox" aria-labelledby="autocomplete-0-label">
  2. Buttons must have discernible text
    Element: <button class="aa-DetachedSearchButton">
  3. ARIA attributes must conform to valid values
    Element: <div class="aa-Autocomplete" role="combobox" aria-expanded="false" aria-haspopup="listbox" aria-labelledby="autocomplete-0-label">
    Error: ARIA attribute element ID does not exist on the page: aria-labelledby="autocomplete-0-label"

The third presumably applies to the search input when opened on the element below:

<input class="aa-Input" aria-autocomplete="both" aria-labelledby="autocomplete-0-label" id="autocomplete-0-input" autocomplete="off" autocorrect="off" autocapitalize="off" enterkeyhint="search" spellcheck="false" placeholder="" maxlength="512" type="search">

As far as internationalization goes, it looks like the buttons have translation parameters in the Algolia docs.

Link to issue report from audit with axe: https://axe.deque.com/issues/7854d2a8-7632-43fd-98a7-ad22683ed4d5

@dragonstyle dragonstyle self-assigned this Apr 19, 2022
@jjallaire jjallaire added this to the Future milestone Jun 8, 2022
@dragonstyle dragonstyle modified the milestones: Future, v1.3 Sep 9, 2022
@dragonstyle dragonstyle added the bug Something isn't working label Mar 1, 2023
@dragonstyle
Copy link
Collaborator

This is injected by our auto-complete library, so the simplest fix would be upstream- related issue:

algolia/autocomplete#963

For now, postponing and I'll work on trying to get fixed upstream.

@dragonstyle dragonstyle modified the milestones: v1.3, v1.4 Mar 7, 2023
@dragonstyle dragonstyle modified the milestones: v1.4, v1.5 Aug 8, 2023
@cscheid cscheid added the upstream Bug is in upstream library label Feb 1, 2024
@dragonstyle dragonstyle modified the milestones: v1.5, Future Feb 7, 2024
@cscheid cscheid mentioned this issue Feb 12, 2024
13 tasks
@signekb
Copy link

signekb commented Jun 13, 2024

Hi!
What's the status on this? I'm having the same issue with the search button.

@cderv
Copy link
Collaborator

cderv commented Jun 13, 2024

Upstream issue is still opened, and iIssue here also as we didn't do any specific handling on Quarto side.

As said, this would need to be dealt upstream in the autocomplete library.

So work to be done (which is usally the status for issue still opened in this repo)

@signekb
Copy link

signekb commented Jun 13, 2024

Ah, yeah, makes sense. Thanks for getting back to me so quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility bug Something isn't working search upstream Bug is in upstream library
Projects
None yet
Development

No branches or pull requests

6 participants