Skip to content

Instantly share code, notes, and snippets.

@jonathantneal
Last active February 14, 2017 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathantneal/c9da7ca01890c3f3bed32bd127bcbe8e to your computer and use it in GitHub Desktop.
Save jonathantneal/c9da7ca01890c3f3bed32bd127bcbe8e to your computer and use it in GitHub Desktop.
Accessible Carousel Markup - the second slide is the current slide
<!-- Carousel - the second slide is the current slide -->
<div id="carousel" role="section" aria-label="Carousel">
<button>Previous Slide</button>
<div aria-live="polite">
<div id="carousel-slide-1" aria-hidden="true">
<p>These are the contents of Slide 1</p>
</div>
<div id="carousel-slide-2">
<p>These are the contents of Slide 2</p>
</div>
<div id="carousel-slide-3" aria-hidden="true">
<p>These are the contents of Slide 3</p>
</div>
</div>
<button>Next Slide</button>
<nav aria-labelledby="carousel">
<button>Slide 1</button>
<button aria-controls="carousel-slide-2" aria-selected="true">Slide 2</button>
<button>Slide 3</button>
</nav>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment