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.

Subscribe

I send a 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. It’s good to make mistakes

    As a designer and developer I’ve made countless mistakes, but that’s part of the reason I’m good at what I do.

  2. Focus appearance explained

    There’s some great stuff coming up in WCAG 2.2, but there’s one rule that’s particularly difficult to understand, so here it is in a bit more detail.