Skip to content

keyboard: 'focused' option and aria-label #671

Answered by NaotoshiFujita
Egpereira asked this question in Q&A
Discussion options

You must be logged in to vote

First, is there a way for me to provide an aria-label for the root element, since it will be focusable by keyboard and consequently announce the slider contents to screen reader users?

The splide instance has the root element and you can assign any attributes to it.
https://splidejs.com/guides/apis/#root

Second, could there be a way to do the same behaviour without adding a tabindex, similar to the css selector :focus-within?

No. Only focusable nodes can receive the keydown event.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Egpereira
Comment options

@NaotoshiFujita
Comment options

@Egpereira
Comment options

Answer selected by Egpereira
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants