Skip to content

fix(a11y): add aria-label to div (algolia#963) #1313

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

Merged
merged 1 commit into from
May 16, 2025
Merged

Conversation

cscheid
Copy link
Contributor

@cscheid cscheid commented May 15, 2025

Summary

(I'm project lead on Quarto) We use autocomplete in our websites, and it's great! However, axe-core complains about a missing aria-label in the outer div element.

This one-line PR should fix that.

I should note that I haven't validated the fix directly because we use the UMD distribution of autocomplete we get from unpkg. However, I've verified that the code change made here causes the build to change precisely how we need it to.

Result

When running axe-core checks, we no longer see the "Ensure every ARIA input field has an accessible name" violation.

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 8e9f66f:

Sandbox Source
@algolia/autocomplete-example-github-repositories-custom-plugin Configuration
@algolia/autocomplete-example-instantsearch Configuration
@algolia/autocomplete-example-playground Configuration
@algolia/autocomplete-example-preview-panel-in-modal Configuration
@algolia/autocomplete-example-starter-algolia Configuration
@algolia/autocomplete-example-starter Configuration
@algolia/autocomplete-example-reshape Configuration
@algolia/autocomplete-example-vue Configuration

@Haroenv Haroenv merged commit aab3d6b into algolia:next May 16, 2025
2 checks passed
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.

2 participants