Accessible360 / accessible-slick

the last (accessible) carousel you'll ever need.
https://accessible360.github.io/accessible-slick
MIT License
254 stars 45 forks source link

Add customization options for autoplay toggle button #19

Closed jasonwebb closed 3 years ago

jasonwebb commented 3 years ago

A lot of folks will likely want to provide custom icons for the autoplay toggle to match the look and feel of their brand/site.

Since the autoplay button actually contains two different icon/sr-only text pairs (pause and play) that are conditionally toggled, I think it would be better to not allow an entire <button> DOM node or string to be provided so we can guarantee that the visibility toggling logic always works.

Instead, let's provide two new options that people can use to pass jQuery or DOM nodes / strings for just the icons so that they can customize the visual appearance with no risk of making the buttons inaccessible.

jasonwebb commented 3 years ago

See the hero banner slider sample on CodePen for a demo of using the new pauseIcon and playIcon settings: https://codepen.io/A360/pen/zYqKvXN