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

Improve accessibility #758

Open
prsdta opened this issue Feb 20, 2019 · 2 comments
Open

Improve accessibility #758

prsdta opened this issue Feb 20, 2019 · 2 comments

Comments

@prsdta
Copy link

prsdta commented Feb 20, 2019

Hi, I'm not a11y expert but I try to think about it as much as possible so I figured I could add a sprinkle of it to lory.

My first concern is the case of infinite that creates duplicates slides. These should definitely have an aria-hidden="true" attribute so that they are correctly ignored by the screen readers and so on.
This seems fairly easy to add in setupInifinte().

Checking out bxSlider or slick, I actually noticed they set aria-hidden="true" to all slides that are off-screen, so I guess this would be the more widely-accepted pattern?
I figure this would mean setting aria-hidden="false" to the active slide (+slidesToScroll) in slide() and set the others to true.

If you guys are okay with this I should be able to create a PR.

Bonus: Improve keyboard navigation

Right now, tabbing to an element into a slide out of the frame makes the browser scroll to it, which screws up lory's calculations. Ideally, preventing tabbing into an element with aria-hidden="true" could be enough to solve this issue (I'm still experimenting around this).

@nstanard
Copy link
Collaborator

Thank you for your input. I would like to get back to work on this project and really appreciate the feedback.

@prsdta
Copy link
Author

prsdta commented Apr 22, 2019

Upping this a bit, since I'm using lory in production now I'd want these parts improved. Any opinion on what I've proposed?
Since I've looked a bit at the code before I feel fairly confident I'm able to write a PR.

Otherwise, I guess I'll work on a fork 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants