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?
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.
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 - 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.
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.
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.
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.