Real talk: Frameworks as HTML

1 minute read

Oh, I love this one.

We use Angular and we don't even touch the DOM!

Cool. So you're telling me your entire team outsourced basic HTML to a JavaScript framework?

Nothing against Angular. You can replace it in your mind with React, Vue or Svelte.

Here's the truth you don't want to hear.

Your fancy component library isn't "abstracting" the Document Object Model (DOM). It's pushing you to ignore it. And guess what? Screen readers, search engines and keyboard users don't give a damn about your Javascript ecosystem. They need real HTML, not a <div> masquerading as a button because you used a framework component whose authors couldn't be bothered to type <button>.

But the framework generates WAI-ARIA compliant code!

Fantastic. Now your inaccessible mess is probably even more inaccessible. Slapping ARIA roles on elements isn't much of a solution. That's because ARIA roles are a contract. Break that contract and screen reader users get stuck trying to click a fake button that doesn't work.

Frameworks don't erase your responsibility to the web. If your "modern stack" can't output proper HTML, it's not cutting-edge. It’s broken by design.

Sent on

Did you enjoy this bite-sized message?

I send out short emails like this every day to help you gain a fresh perspective on accessibility and understand it without the jargon, so you can build more robust products that everyone can use, including people with disabilities.

You can unsubscribe in one click and I will never share your email address.