Created
August 16, 2024 01:18
-
-
Save neodigm/38a69f35e59d6d40a686ef6d9602c42a to your computer and use it in GitHub Desktop.
Flickity A11y fix simplified
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fFlick = function(){ | |
Array.from(document.querySelectorAll( ".flickity-slider [aria-hidden='true']" )).forEach( ( e )=>{ | |
e.setAttribute("aria-hidden", "false") | |
e.removeAttribute("aria-hidden") | |
e.dataset.flickPoly = "1" | |
}) | |
}; | |
["DOMContentLoaded", "resize", "click"].forEach( ( evn )=>{ | |
document.addEventListener( evn, ( ev )=>{ fFlick() }) | |
}) | |
setInterval( ()=>{fFlick()}, 96 ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment