Skip to main content

HTML isn’t quite accessible out of the box

Posted in Accessibility

There’s a commonly held idea that HTML is accessible out of the box, before any CSS has been applied.

This is put to the test every year on CSS Naked Day and, while many websites are still perfectly usable without any styling, there are still some barriers that CSS removes.

In fact, shortly after stripping the CSS from my website I received an automated email from the Google Search Console Team, highlighting issues that weren’t there until CSS Naked Day:

Search Console has identified that your site is affected by 3 Mobile Usability issues:

  • Text too small to read
  • Clickable elements too close together
  • Content wider than screen

‘Naked’ HTML will allow text to be enlarged while allowing content to reflow nicely, but there are some things, like data tables that are wider than their container, that need CSS to be properly accessible. And, even in 2022, there are still browser bugs we need to work around with extra styling. Some issues will be fixed, but other are unlikely to change as they’d probably break countless live websites.

Contrary to popular belief, we’ll always need a small amount of <style> to make things truly accessible, but well-crafted markup goes a very long way.

Accessibility in your inbox

I send an accessibility-centric newsletter on the last day of every month, containing:

  • A roundup of the articles I’ve posted
  • A hot pick from my archives
  • Some interesting posts from around the web

I don’t collect any data on when, where or if people open the emails I send them. Your email will only be used to send you newsletters and will never be passed on. You can unsubscribe at any time.

More posts

Here are a couple more posts for you to enjoy. If that’s not enough, have a look at the full list.

  1. Images as the first thing in a button or link

    If the text of an interactive element like a button or link is preceded with an accessible image, we’ve probably got an accessibility problem.

  2. Alt text for CSS generated content

    There’s an interesting feature in Safari 17.4 that allows content added with CSS to have ‘alt’ text. I’m not sure how I feel about this.