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

Use aria-describedby to add the filter count to aria-live #177

Open
aevanson opened this issue May 8, 2019 · 4 comments
Open

Use aria-describedby to add the filter count to aria-live #177

aevanson opened this issue May 8, 2019 · 4 comments
Labels
Accessibility Accessibility issues break WCAG guidelines or best practices bug Something isn't working

Comments

@aevanson
Copy link
Collaborator

aevanson commented May 8, 2019

There seems to be a restriction on having multiple items read out by aria live. Right now, the text in the Sort field header (Showing 1 - 12 of 24 products) is taking precedence. Alison recommended trying aria-describedby to append the filter count.

@aevanson aevanson added bug Something isn't working Accessibility Accessibility issues break WCAG guidelines or best practices labels May 8, 2019
@aevanson aevanson added this to the Global Accessibility Day milestone May 8, 2019
@liskulic
Copy link
Collaborator

@aevanson, is there a specific element that the aria-describedby should be placed in?

@liskulic
Copy link
Collaborator

Adding aria-describedby doesn't work. I tried adding the actual filter count text inside the but the announcement of the text inside is incorrect. VoiceOver announces everything in the wrong order.

@brianelton brianelton removed this from the Global Accessibility Day milestone May 15, 2019
@liskulic
Copy link
Collaborator

I think the best solution to this is to have only one aria-live block to avoid conflicts with precedence, especially since aria-live is not always reliable anyway.

In essence, for the "0 filters applied" text, remove aria-live and append that same text after the "Showing 1 to 12 of 40" for screen readers only.

@alisonrae, @aevanson, thoughts?

@aevanson
Copy link
Collaborator Author

@liskulic I like that idea. Works for me. Do you think it should be it's own component, like "live alerts"? We would need this for adding items to cart, etc. that other components could push events to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility Accessibility issues break WCAG guidelines or best practices bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants