Splidejs / splide

Splide is a lightweight, flexible and accessible slider/carousel written in TypeScript. No dependencies, no Lighthouse errors.
https://splidejs.com
MIT License
4.83k stars 418 forks source link

Inactive pagination items are not accessible via TAB key #1295

Open dtelijis opened 5 months ago

dtelijis commented 5 months ago

Checks

Version

v4.1.3

Description

Contrary to the standard a11y rules and guidelines, The active pagination item is focusable, while the other pagination items are non-focusable (tabindex="-1').

The idea is, that if a pagination item is accessible via a mouseclick, then it should also be accessible via TAB press.

Reproduction Link

No response

Steps to Reproduce

  1. Hit TAB as much as needed, until reaching the pagination area.

Expected Behaviour

Every pagination item which is not active (i.e. , which corresponds to a slide which is not visible at the moment), should be focusable, and not have a tabindex="-1" value.

The active pagination item SHOULD be non-focusable (i.e., have a tabindex="-1" value), although not mandatory.

wplit commented 2 months ago

This is incorrect. There should only be one focusable element inside of a tablist, all the rest should be not be focusable. left/right changes which tab is focusable, but only one at any one time should be focusable with the tab key.

see examples - https://www.w3.org/WAI/ARIA/apg/patterns/tabs/examples/tabs-manual/