-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
New Feature: Accessibility #6
Comments
Hi @SLMNBJ , What do you mean by accessibility? Like aria-hidden="" labels? Thanks in advance! |
Hi @davidjerleke, |
Hi @SLMNBJ, I think the accessibility implementation should be up to every user. Embla Carousel’s purpose is to provide tools for building great carousels rather than having a bunch of features out of the box, so I'm not going to add this into the Embla core unless it does get a lot of traction. I hope this makes sense 🙏? With that said, would you like me to create a CodeSandbox example of how to achieve this? Cheers 👍! |
I’m closing this due to lack of response. Thank you for reporting this 👍🏻! |
The features needed for a carrousel a11y are described here : https://www.w3.org/TR/wai-aria-practices-1.1/examples/carousel/carousel-1.html |
I'd be surprised if adding a11y attributes added much too much to the bundle (though 1. I could be wrong, and 2. it's subjective). |
Hi @mantagen, Thank you for sharing your thoughts. It depends on how much accessibility we want to implement into the core. If it's only the Recently, I've considered adding accessibility stuff to the library core. I'm thinking something along these lines:
...and more. But if I'm to proceed with that suggestion, I'm considering to remove the following options:
...in order to keep the library lightweight. I've raised this before releasing major version 3 here, and at that time, Embla users voted to keep these. But only 10 people voted so it's not like people seem to care too much about it. Also, it seems like React users don't utilize these options much. What's your thoughts about my suggestion? Best, |
This sounds good to me. I would remove those classes, however I'm pretty much exclusively using css-in-js at the moment, whereas if I was using classes I may be of a different opinion! To me, some small accessibility additions seem more like core functionality than classes. Following from what @hotgeart has said, the basic
I've seen that swiper are working on improving accessibility too, nolimits4web/swiper#3149, though obviously it is not a lightweight solution -- eg. includes navigation etc etc -- so not all of their criteria apply here, it might be worth looking at their discussion. I'm wondering if @hotgeart @SLMNBJ what do you think? |
Thank you for your input @mantagen. If you don't mind me asking, where did you get that nice list of
I think But Embla tracks slides in and out of view so I'm thinking that maybe the Best, |
Hi David, That list is essentially from https://www.w3.org/TR/wai-aria-practices-1.1/examples/carousel/carousel-1.html There are two potential problems with adding
I'd say that perhaps (1) is not such a big deal, but that (2) is. If the library added a This is why I'm currently of the opinion that adding |
For further reference: https://act-rules.github.io/rules/6cfa84 Also, I've just seen that the carousel slides on tab press if new focus is within the following slide. I'm not sure what the implications of this are... as in, I'm not sure if it is okay to dynamically change from |
Thank you for the further information @mantagen. That's helpful 👍. I'm thinking that we should create a CodeSandbox with all the desired accessibility features. For example, we can use the default React sandbox as a starting point. I'm hoping that by the time we're done with the sandbox, we should have a clear picture of what should go into the Embla core and not.
When I implemented this, I thought it would be a good idea to mimic the browser behavior to some extent, by brining the focusable element into view. But I'm open to other suggestions. Best, |
Yes I believe that content of non-visible slides should not be tabable:
This article also suggests to add Yes, let's start from the sandbox, and see where we get. |
Hello, |
Hi @Wikgabja, You can use the same approach as the selected class toggling functions here. And don’t forget to attach this function to the select and pointerUp event like this. I hope that helps. I’ll soon release v6 which I think can be somewhat of a game changer for all Embla users that are frustrated about missing features (like accessibility). v6 comes with a plugin system that will enable Embla users to use plugins to extend it beyond its core functionality. And anyone will be able to write and share their own plugins too: More information coming as soon as v6 has been released. You’ll find it on the documentation website then. Best, |
Just curious since I'm reviewing this carousel for use on our site: Are there any good a11y plugins available now? I noticed the plugin route was suggested but none were mentioned here or on the site, which is why I figured I'd ask. Keyboard a11y isn't too bad (as long as you're sighted) but screen readers just identify everything right now as "button" so it's not helpful yet. Not sure if you have to dig into the guts in order to announce which bullet/dot you're on, for example. |
Hi @patricknelson, No plugin yet. But the secret project will include accessibility: I can’t give an ETA on when it’s ready though because it’s under development. If you have to build something soon and want to use this library you have to do it yourself. Best, |
Ok. Thanks for the feedback. Just curious: What’s the point to having a “secret” project in open source? Why not just describe what it is and be frank that it’s just incomplete or the concept is under development? |
@patricknelson because in this case I don't want feedback and any interference before I have a working proof of concept or an experimental feature ready. |
Calling all accessibility experts 👋! Could anyone help me with creating a complete list of things that are required to create a fully accessible carousel? It's for the accessibility option that will be available in the carousel generator. |
@davidjerleke everything you need is in the W3C example: |
@davidjerleke Makes sense. The updated description helps a bit too. Looks like an interesting project. |
Hey guys, thought this is a great use-case for a plugin, so here is my attempt: https://github.com/nwidynski/embla-carousel-aria
|
Accessibility should be at the core of the plugin, otherwise, it's a No for me. |
@alvinkonda if you don’t want to understand this, then have fun finding a different library. |
What is the status here? I am willing to move from Swiper to Embla, but since a11y is currently not available I don't think this library is an alternative atm for me, although I really love this package 👍🏼 |
Thanks for your question. Please help me understand what are you looking for. A convenient solution where the package does everything for you? Or simply an example setup that's a11y compliant? |
Would be nice to have the slider accessibile, maybe with custom labels (i18n).
The text was updated successfully, but these errors were encountered: