Skip to main content Accessibility Feedback

JavaScript-Free Components

It’s sometimes possible to create JavaScript-free interactive components entirely with native HTML elements.

These are not hacks. They’re semantically valid, accessible components that browsers give you out-of-the-box. These can all be treated as progressive enhancements, with no fallbacks needed for unsupported browsers.

Quick aside: many of the CSS-only versions of JavaScript components that you see on other sites are hacks, and suffer from usability and accessibility issues as a result.