Skip to Main ContentSkip to Footer

Accessibility: “Screen Readers and Google don’t use Javascript” Debunked myths from the web

November 11, 2019

On the web, there are many hoaxes or old beliefs still spreading about Web accessibility and Javascript mainly on two forms:

  • StackOverflow Q&A
  • SEO Articles

StackOverflow answer from 2008 still being used

Question: “To what extent can JavaScript be used while still meeting these requirements?”

Bad Answer: “If accessibility is your primary concern, always start a website using standards-compliant HTML. If it’s a web application (form submissions, etc), make sure the forms will work using just HTTP GET and POST. Once you have a complete website/application you can add bits of CSS and JavaScript as long as the site still functions, with either or both off.”

This is an answer from 2008 that might still be used by young developers! Screen readers, like everything else, have changed immensely since 2008.

Here’s a link to the answer: https://stackoverflow.com/a/266869

Here’s another question where a user of a screen reader replies with the correct answer confirming the fact that you can use Javascript without worries: https://stackoverflow.com/a/3997028

Google renders Javascript elements too

Until last year, it was taught that Google wasn’t able to render Javascript pages and required static HTML to index them. This has changed luckily.

Recently updates have happened inside Googlebot, and it crawls the web every day using a Chromium browser starting in May 2019!

When Googlebot fetches a URL from the crawling queue by making an HTTP request, it starts by parsing of the HTML response. This works well for classic websites or server-side rendered pages where the HTML in the HTTP response contains all content.

Some JavaScript sites may use the app shell model where the initial HTML does not contain the actual content, and Googlebot needs to execute JavaScript before being able to see the actual page content that JavaScript generates.

Googlebot then queues all pages for rendering. Once Googlebot’s resources allow it, a headless Chromium renders the page and executes the JavaScript. It uses the rendered HTML to index the page and to find more links.

1 SghZLI5Z5LYK2 Gg7zyKgw

Conclusion

You can use Javascript without any problem! We are in 2019 and old stories or myths that screen readers don’t use Javascript or that Google crawlers doesn’t index Javascript contents are completely false and should be avoided!

You should spend your time improving other parts of your web experiences using all the power of Javascript and applying other tips or tricks removing common web accessibility errors too or SEO errors in just a few minutes!

References and Resources


Subscribe to my email list!

If you enjoy my work, you should definitely join my newsletter"Giorat Mails". It’s one email a week with everything interesting I’ve read or found, plus new articles and fresh tutorials.

Sign up for our newsletter