DEV Community

Discussion on: Easy Accessibility: <button> vs <a>

Collapse
 
floede profile image
Janus Hasseriis • Edited

I don't think the distinction between a and button is all that difficult when given base level examples. (Although many sites and developers still get it wrong, or use clickable divs)

I'm way more interested in discussing how we semantically construct more complex elements.
Like the ubiquitous "card".
A box with an image, a header, some text. Maybe more.
If I click anywhere within the card, a new page opens.

Is the whole card just placed inside an a? That doesn't feel quite right.