Calling all Accessibility testers - what is your view of turning off CSS and JavaScript to view a website?

When conducting accessibility testing, do you find it valuable to turn off JavaScript and CSS to evaluate a website’s basic functionality and content structure?

What are the pros and cons you’ve experienced with this approach?

Given JavaScript and CSS are now considered Accessible, Microsoft do not accept defects raised during these tests. Are they right?

Is this broader in terms of good practice?

3 Likes

The answer to this is context-dependent, so there is no “right” answer. As you say, JavaScript and CSS are “accessibility supported” technologies, so WCAG conformance can rely on them being enabled (unless you’re still working to WCAG 1.0!). Strictly speaking, your accessibility conformance statement is supposed to list all the relied-on technologies, but in practice almost no one does this.

Most organisations have no expectation that their website will be usable without JavaScript or CSS, so there is little point doing the test for such organisations.

Turning off CSS can be useful in revealing content you wouldn’t otherwise know about, such as dialogs that are only displayed under certain circumstances. However, this technique is less useful than it used to be because it often reveals huge swathes of content, much of which would never be displayed on the page you are testing. Furthermore, if the page contains SVG images, they expand to fill the entire window width, so they may be hundreds of times taller than usual, resulting in a lot of vertical scrolling.

There is one exception and perhaps a few others like it. The GDS Service Standard states that websites built to that standard must be fully usable without images, CSS or JavaScript. There are obvious exceptions for content such as maps. The Service Standard applies to all UK central government departments and some non-central public sector organisations.

Developers never read this requirement and can rarely fix the website when the issue is raised after they have built it, so don’t be surprised if you find UK government websites that don’t work without JavaScript and CSS. I could (but won’t) show you such a website that is entirely blank without JavaScript because the entire contents of the page body are inserted by a script.

2 Likes

Thanks Steve,

Agreed on the technique being less useful that it used to be, still good for Gov services (given I’ve worked in public sector for a lot of my career), and no I am not still working to WCAG 1.0 :grinning: - I hadn’t even heard of WCAG when it was still in it’s infancy. The Public Sector Bodies Act 2018 is what brought Accessibility into my world.

I’ve seen the SVG images that expand to fill the whole screen.

Really glad I asked the question as you have confirmed my thinking around it.

I still have the tests in my Accessibility testing, and now they are expanded to look at CSS and JavaScript rather than just disabling it to test.

Great answer.

J

1 Like

I mostly still use the disable CSS and Javascript tests. The value depends on the context (as already mentioned), but still give me some useful information most of the time. e.g. I may use them in exploratory testing, but not necessarily report on the findings.

I’m currently working with a product that relies on JS components. So disabling JS isn’t super useful in this context. But I still disable CSS, as its a good way to get a sense of how well structured the page is. Sensible structure, and presentation suggest we’re heading in the right direction.

Edit: I’ve also got a background in UK Gov

2 Likes

It’s interesting that we all work or have worked in GOV.UK environments. As Steve mentioned there is an active requirement to only apply the ‘bells and whistles’ with CSS and Javascript and all sites should function fully without them. Or more formally applying progressive enhancements with CSS and Javascript.

Another aspect, which seems to have been consistent is CSS and Javascript both seem to increase the risk of vulnerabilities being introduced. This is only anecdotal on my part though from managing Pen testing cycles for a number of in house developments in the past.

1 Like

Interesting to hear about the requirement for UK Gov.

I only turn off CSS/Javascript with the WAVE feature to demonstrate where the tab order comes from.

Hi Anna,

In case you want to learn more about, here’s the GOV.UK Progressive Enhancement guidance which describes how to apply progressive enhancements to website development.

1 Like