It’s far easier to design an accessible website if your focus is on accessibility from the get-go, but this is a luxury many of us can’t afford. It’s likely that you already have a website on your hands, and, if you’re reading this, you’re probably wondering how you can test your site’s accessibility so you can make changes accordingly.
Here’s a straightforward guide on testing your Drupal site’s accessibility.
Before you dive into automated testing solutions, it’s always good to go through your website manually to identify pitfalls and barriers to accessibility. This is an excellent way to develop and refine your “eye for accessibility”.
If you want your website to render correctly across devices and work well with assistive technologies, the underlying code (HTML and CSS) must comply with the most recent web standards.
Here are a few things to look out for where HTML is concerned.
You can use the World Wide Consortium’s markup validation service and CSS validation service to verify your site’s HTML and CSS markup.
Most website designs primarily cater to users who navigate using a cursor; however, web accessibility standards now require you to make accommodations for all users including those with disabilities (visual impairments, auditory impairments, difficulty holding a mouse, and so on). Therefore, it’s crucial to ensure that users browsing with their keyboard or with a screen reader don’t have trouble navigating your website.
Here are some things to consider:
Screen readers like NVDA (Windows) and VoiceOver (MacOS) enable users with visual impairments to navigate through websites via sound by reading aloud the contents of each page. A 2019 survey by WebAim shows that 79.9% of screen reader users with disabilities rely solely on sound to navigate.
The best way to ensure that the screen reader experience on your website is smooth and seamless is to download a screen reader, run the application, and navigate through your site yourself. But before you do that, here are some basics to cover:
This Web AIM article outlines how you can use CSS to make content that’s “visible” to screen reader users while it remains invisible to sighted users.
Text color needs to have a contrast ratio of at least 4.5:1 with the background color to meet WCAG 2.1 standards. There are several tools you can use to test your site’s color contrast ratio. Here are a few:
There are all sorts of reasons why users may not be able to access JavaScript elements. This tweet from Jake Archibald offers us a friendly reminder:
In any case, non-script users exist, and it’s your job to make sure they get a coherent experience when they access your website. To disable JavaScript in your browser to start testing, you can use the option in the dev tools menu, or install the Toggle JavaScript Chrome extension for one-click toggling.
Chris Ashton at Smashing Magazine wrote an in-depth article titled I Used The Web For A Day With JavaScript Turned Off, and we strongly suggest checking it out to understand how non-script users experience the web.
Similarly, make sure that your website renders properly without CSS styling enabled. This is especially important considering some people use their own custom stylesheets on their browser; try to use plain and proper semantic HTML so that pages retain their logical structure regardless of style being used.
You can use WAI-ARIA markup in some situations to further improve accessibility. For example:
Most of the tools mentioned thus far have very precise functions; however, there also exist more general testing tools which can check entire web pages and even sites for various accessibility issues. There are many such tools, and they can save you a ton of time – but you must fully understand what each of them is for if you want to get the most out of them. Running a full accessibility audit without any prior knowledge or preparation can produce overwhelming results that are difficult to process and prioritize.
These are two of our favorite accessibility testing tools that you can run directly from your browser.
Here’s how you can use Axe to test a page’s accessibility.
Once the tool finishes analyzing the page, you’ll see a list of issues on your screen (if you don’t, then congratulations! But there will most likely be a few things you’ll need to fix). You can click on any issue to access more details, including its level of impact on accessibility (Low to High) and potential workarounds and solutions. Use the Toggle Highlight feature to make issues more visible.
This nifty tool aims to make accessibility testing more intuitive by providing easy-to-understand visualizations of accessibility issues and annotations on how to fix them. To try it out, scroll down to the bottom of this page and drag the tota11y icon onto your bookmark bar.
To run the tool on any web page, just click on the bookmarklet. This will toggle a button on the bottom-left corner of the page which will expand into a menu. Then, you can select whatever you want to focus on, and the tool will display any relevant issues along with details as to where they are on the page, and how you can fix them.
If Drupal’s built-in accessibility features aren’t enough, you can also further develop your website’s accessibility using a variety of user-contributed modules. Some of these are listed below:
Here’s a more comprehensive list of accessibility-focused Drupal modules.
As you move through the various steps of testing your site’s accessibility, make sure you take notes of your findings and modifications. This will help you familiarize yourself with various accessibility concepts that you can incorporate in future web projects.
You might even want to consider converting your notes into a comprehensive accessibility policy for your organization, which you can then publish on your site as a statement of your commitment to inclusive web experiences.
Still unsure of where to start? Want to update your accessibility know-how? Need some help crafting an accessibility policy for your organization? At Mpire Solutions, accessibility is our top priority. Get in touch with us for personalized assistance!