This document provides interactive demonstrations of the code examples from the article "From <div> Hell to SEO Heaven". Click on the elements to see their behavior and observe the structural differences.
This uses a generic div to mimic a button. Try clicking
it, or tabbing to it (you can't without custom JS!), or pressing
enter on it.
A div with ARIA attributes to improve accessibility.
You can tab to it and press Enter/Space.
A native <button> element. Accessible and
functional out-of-the-box.
Click the buttons below to open each version of the modal. Try navigating with a keyboard (Tab key) and observe the differences.