问题
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:
Maybe you could try
height: 0;
width: 0;
overflow: hidden;
Or
position: fixed;
top: -999999px;
left: -999999px;
来源:https://stackoverflow.com/questions/19369249/displaynone-on-fading-carousel-breaks-accessibility