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(a11y): Count aria-label without duplicated item in loop option #4782

Closed
wants to merge 1 commit into from

Conversation

digitas-git
Copy link

If the loop option is set, the aria label may only be attached to the non-duplicated elements. Only the elements that are not duplicated are counted.

FIX: #4781

@nolimits4web
Copy link
Owner

Thanks for your PR! Don't you think maybe it would be better if duplicated slides will have same aria label index as their original copies? You can see in loop mode each slide has data-swiper-slide-index attribute with "realIndex"

@digitas-git
Copy link
Author

digitas-git commented Jul 21, 2021

The aria-label is usefull for screenreader to tell the user which slide is active and how many slider there are. But on duplicated slides we have the attribute aria-hidden=true this tell the screenreader that he shouldn't read it. So i think its unnecessary to set the "realIndex" there.

@nolimits4web
Copy link
Owner

We don't set aria-hidden on duplicated slides, so I made what I suggeted

@digitas-git
Copy link
Author

Hey, thats correct, it was my fault, we build in our project the aria-hidden option. Thanks for fixing.
A PullRequest for aria-hidden will follow. Many Thanks.

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.

Count aria-label without duplicated item in loop option
2 participants