Skip to main content

Building an accessible show/hide disclosure component with vanilla JS (Go Make Things)

Visit external resource

A disclosure component is the formal name for the pattern where you click a button to reveal or hide content. This includes things like a “show more/show less” interaction for some descriptive text below a YouTube video, or a hamburger menu that reveals and hides when you click it.

Chris’s article provides an accessible means of showing and hiding content at the press of a button when the native HTML details element isn’t suitable.

External Link Bookmark Note Entry Search