Display:none on fading carousel breaks accessibili

2019-08-29 13:10发布

I've got a twitter fading carousel type thing going at the bottom of http://seontario.org. It uses display:none to show and hide the tweets. But display:none doesn't work with screen readers because they don't render that content. Any thoughts on how to do this so that it would be accessible?

// TWITTER FEED
jQuery(document).ready(function($){

var latesttweets = $(".latest-tweets ul li");
var tweetIndex = -1;

function showNextTweet() {
    ++tweetIndex;
    latesttweets.eq(tweetIndex % latesttweets.length)
        .fadeIn(600)
        .delay(8000)
        .fadeOut(400, showNextTweet);
}

showNextTweet();
});

1条回答
干净又极端
2楼-- · 2019-08-29 13:37

Maybe you could try

height: 0;
width: 0;
overflow: hidden;

Or

position: fixed;
top: -999999px;
left: -999999px;
查看更多
登录 后发表回答