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
Enforce ARIA rule #1535
Comments
What would be the solution to prevent keyboard tabbing to those elements? According to the documention that you linked to it's ok to use tabindex -1 . It's when you have a tabindex of 0 and aria-hidden = true that you violates the Axe recommendation. Maybe there is a bug with Axe reporting aria-hidden=true and tabindex=-1?? |
Divs aren't focusable elements unless we add the tabindex so by just not adding it the problem should be solved. As per in the documentation: Content made unfocusable through tabindex:
This particular example is different, there is a parent element, the div, that has |
I think the main issue here is that when |
Also seeing this issue. We are required to maintain a certain level of accessibility standing. |
Any updates on this issue? Is someone actively working on this? I'm also experiencing the same problem and the removal of tabindex="-1" would make life easier |
Is there any update on this? I am getting google lighthouse accessibility ranked down due to this issue. |
I am also getting this issue. I think the suggested fix is not correct. As you can use tab to move the hidden slides into view, then the aria-hidden attribute should not be set on those slides. |
Hey @diazmaria! Just fixed the problem externally by adding a
Reference: |
@aganglada Thanks but, how do you hook into beforeChange in react-slick? And what do you mean by "Hold" in step one? |
Passing
Using |
I believe there's a typo here |
akiran#1535 Remove tabindex when aria-hidden="true" in track.js Update snapshots
akiran#1535 Set tabindex to -1 when aria-hidden="true" in track.js Update snapshots
Hi @aganglada , how can I apply this property on the container of the slide? Plugin adds two divs above each slide, so it doesn't work for me. :/ |
@fanczerni
|
@fanczerni @aganglada @oh-roman When there is more than one slide to show, managing the active slides for componentDidUpdate() {
this.hideAriaHiddenTiles();
}
const settings: Settings = {
afterChange: () => this.hideAriaHiddenTiles(),
}
hideAriaHiddenTiles() {
Array.from(document.querySelectorAll('.slick-slide')).forEach((slide: HTMLElement) => {
slide.style.visibility = slide.classList?.contains('slick-active') ? 'visible' : 'hidden';
});
} |
Is there any update on this? I am getting google lighthouse accessibility ranked down due to this issue. |
I made a small extension for showing also the slide being replaced while the animation is happening:
|
This works but not correctly for infinite, it'd require some additional modifications |
Hopping in here to say we're also experiencing this issue about a year later from the last comment. Thanks for all your work and attention here. Hopefully something gets fixed soon. |
It is still open even after 2+ years. |
This more or less fixed the issue for me, but the way that new slides advanced while hidden and then popped into visibility after the animation wasn't acceptable. I ended up going with this:
|
DESCRIPTION
We can find
slick-slides
that havearia-hidden="true"
andtabindex="-1"
attributes. This breaks the ARIA rules to have any tabindex value (indicating the element is focusable) whilst also having the hidden flag for an element.Found with 'Axe' Chrome extension to flag accessibility issues
Docs: https://dequeuniversity.com/rules/axe/3.2/aria-hidden-focus?application=AxeChrome
Replicate here: https://codesandbox.io/s/ppwkk5l6xx
CURRENT:
<div data-index="2" class="slick-slide" tabindex="-1" aria-hidden="true" style="outline: none; width: 430px;"></div>
EXPECTED:
<div data-index="2" class="slick-slide" aria-hidden="true" style="outline: none; width: 430px;"></div>
Solution: tabindex attibute should be removed when
aria-hidden="true"
The text was updated successfully, but these errors were encountered: