Open prsdta opened 5 years ago
Thank you for your input. I would like to get back to work on this project and really appreciate the feedback.
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 😅
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 anaria-hidden="true"
attribute so that they are correctly ignored by the screen readers and so on. This seems fairly easy to add insetupInifinte()
.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 settingaria-hidden="false"
to the active slide (+slidesToScroll
) inslide()
and set the others totrue
.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).