You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The most important change that needs to be made is that all tab-related markup and behaviors needs to be removed, since carousels do not visually resemble tabs at all and therefore would not be expected to function that way by real sighted keyboard and screen reader users.
Wrapper and structural elements
Remove role="tablist" from the wrapper <ul>.
Remove role="presentation" from the <li>s.
Each slide dot button
Remove role="tab" from each slide dot button.
Remove aria-controls from each slide dot button.
Remove tabindex from each button, since a roving tabindex is not appropriate for carousels.
Remove aria-selected from the active slide dot button.
Add aria-current="true" to the button that is currently "active".
Move the icon to an inner DOM element so that it can be hidden from screen readers using aria-hidden="true".
Wrap the inner text in a <span> and apply CSS to make it visible to screen readers only.
Update the inner text of each button to use the format "Go to slide [x]" to make it more clear that these are actionable controls, not slides in themselves.
Remove the aria-label from each slide dot button once the above changes are made, since the inner text will act as a more robust accessible name (see the First Rule of ARIA Use).
Documentation
Add note about feature change in the main README
Currently the buttons and their wrapper list are marked up like so:
<ulclass="slide-dots"><liclass="slick-active"><buttontype="button" id="slick-slide-control00" aria-current="true"><spanclass="slide-dot-icon" aria-hidden="true"></span><spanclass="slick-sr-only">Go to slide 1 of 6</span></button></li><li><buttontype="button" id="slick-slide-control01"><spanclass="slide-dot-icon" aria-hidden="true"></span><spanclass="slick-sr-only">Go to slide 2 of 6</span></button></li>
...
</ul>
The text was updated successfully, but these errors were encountered:
The most important change that needs to be made is that all tab-related markup and behaviors needs to be removed, since carousels do not visually resemble tabs at all and therefore would not be expected to function that way by real sighted keyboard and screen reader users.
Wrapper and structural elements
role="tablist"
from the wrapper<ul>
.role="presentation"
from the<li>
s.Each slide dot button
role="tab"
from each slide dot button.aria-controls
from each slide dot button.tabindex
from each button, since a roving tabindex is not appropriate for carousels.aria-selected
from the active slide dot button.aria-current="true"
to the button that is currently "active".aria-hidden="true"
.<span>
and apply CSS to make it visible to screen readers only.aria-label
from each slide dot button once the above changes are made, since the inner text will act as a more robust accessible name (see the First Rule of ARIA Use).Documentation
Currently the buttons and their wrapper list are marked up like so:
When what we really want is:
The text was updated successfully, but these errors were encountered: