flickity
flickity copied to clipboard
Fix/stop autoplay on focus
A carousel set to autoplay
does not stop when it is focused. This is an issue for screen reader and other keyboard users who can't prevent this via hovering with a mouse. See WAI-ARIA Authoring Practices.
This PR stops the carousel when it has focus or one of the buttons has focus and resumed autoplaying when these are blurred.