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 BeforeOptions search input having invalid aria-activedescendant when no results are found #1717

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

alex-ju
Copy link
Contributor

@alex-ju alex-ju commented Feb 29, 2024

Summary

If there are no search results (hence no highlighted index) we currently show a truncated, invalid value for aria-activedescendant (for instance ember74-). In this PR we propose to only expose a value for aria-active-descendant if there are results.

Example

The example below uses the helpers-testing-single-power-select instance in the test-app.

Automated accessibility checks using axe

BeforeAfter
05-ActiveDescendant-before 06-ActiveDescendant-after

Motivation

At @hashicorp we use <PowerSelect> extensively and we are grateful to see the many improvements introduced lately.

This change is primarily motivated by the desire to further improve the accessibility compliance of this component – in this instance, by providing a valid value for aria-active-descendant.

If there are no search results (hence no highlighted index) we don't expose value for `aria-active-descendant` (we currently show a truncated, invalid value)
@mkszepp mkszepp merged commit 61d7c2e into cibernox:master Feb 29, 2024
19 checks passed
@mkszepp mkszepp added the bug label Feb 29, 2024
@alex-ju alex-ju deleted the alex-ju/a11y-fix-active-descendant branch February 29, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants