question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Accessibility Issue(ISO VoiceOver, Android TalkBack)

See original GitHub issue

Screenshot for slick Accessibility Issue

  1. When VoiceOver or TalkBack is on, only the first item of the carousel cant be focused, if the previous or next button has be clicked, the items current presented can’t be focus.
  2. And there is weirder thing that some links of the items is not clickable.
  3. If item div only include img with tabindex=“0”, when item be focused, then Slick recalculates position, but not update Prev and Next arrows. (Add this on 2/24/2016)
<div class="carousel">
    <div class="item">
        <img tabindex="0" src="" alt="Uploaded try-on image">
    <div>
    <div class="item">
        <img tabindex="0" src="" alt="Uploaded try-on image">
    <div>
    ...
</div>

(4). (Suggestion:) When the arrow button is disabled, the element should add tabindex=“-1”, so the keyboard is not able to focus it. (Add this on 2/24/2016)

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:6

github_iconTop GitHub Comments

4reactions
bfrablecommented, Dec 9, 2016

@leggomuhgreggo

        _.$slideTrack.attr('role', 'presentation');

        _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
            $(this).attr('role', 'tabpanel');

            //Evenly distribute aria-describedby tags through available dots.
            var describedBySlideId = _.options.centerMode ? i : Math.floor(i / _.options.slidesToShow);

            if (_.options.dots === true) {
                $(this).attr('aria-describedby', 'slick-slide' + _.instanceUid + describedBySlideId + '');
            }
        });

changing role from listbox to region and role from option to tabpanel fixes this.

2reactions
bfrablecommented, Dec 9, 2016

So I encountered this issue and came across whats causing it.

    _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
        $(this).attr({
            // 'role': 'option',
            // 'aria-describedby': 'slick-slide' + _.instanceUid + i + ''
        });
    });

If I comment out those two lines, everything works as expected. I’m not an accessibility expert, but I think screenreaders read role=option as a combo / select box and is making the slider as a whole clickable.

https://www.w3.org/TR/wai-aria/roles#option

@leggomuhgreggo slicktrack is getting a role of listbox and then each slide is getting a role of option. This is whats giving the “broken” experience. It might be a good idea to make these options so developers can achieve the experience they’re looking for.

Making each slide a tabpanel and giving slicktrack a role of region should be suffice though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Turn TalkBack on or off - Android Accessibility Help
Option 1: Press both volume keys · On the side of your device, find both volume keys. · Press and hold both volume...
Read more >
Mobile Accessibility 101: Mobile Screen Readers - Level Access
Level Access is kicking off mobile accessibility series with a comparison of the TalkBack (Android) and VoiceOver (iOS) screen readers.
Read more >
Turn on and practice VoiceOver on iPhone - Apple Support
Learn and practice VoiceOver gestures · Go to Settings > Accessibility > VoiceOver. · Turn on VoiceOver, tap VoiceOver Practice, then double-tap to...
Read more >
Talkback and VoiceOver guide
The list the common gestures for Android and iOS screen readers.
Read more >
Accessibility Screen Readers - W3Schools
Get started on Android with TalkBack · Turn on and practice VoiceOver on iPhone. Desktop and laptop. For desktop and laptop computers, there...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found