We have updated our Privacy Policy and Privacy Options

Got It Button arrow

A/B Testing & ADA Compliance: What You Need to Know


The Americans with Disabilities Act (ADA) prohibits discrimination against individuals with disabilities. A disability in this context is a physical or mental impairment that limits one or more major life activities. 

Title III of the ADA prohibits discrimination on the basis of disabillity in “places of public accommodation.” When the ADA was signed in 1990, the focus of Title III was the standards required for business’s physical locations in order to accommodate individuals with disabilities. The internet was not a large part of peoples’ lives at that point; accessibility of websites wasn’t even considered. However, as the internet has become more and more widespread, Title III is being interpreted to include websites as places of public accommodation.

ADA compliance for a website is tricky. You can’t just add a plugin that automatically makes your website ADA compliant – and there are disagreements in what even qualifies as full ADA compliance for a website.

The Department of Justice generally uses the Web Content Accessibility Guidelines (WCAG) as a guide to gauge whether a website is accessible. Websites should meet the guidelines for all Level A and AA requirements to be considered accessible.

However, even when following the WCAG, it may be difficult to discern if you’re actually meeting specific criteria or not – whether it’s because of the wording in the document or the ever-changing trends in website design and browser capabilities.

Why is ADA compliance for websites important?

If your website is found to be inaccessible to individuals with disabilities, you’re not in compliance with the law, which means you could face lawsuits.

There are other factors to consider as well. Many Americans have a disability of some sort that affects how they experience your website. This could be a visual impairment like colorblindness, or a hand injury that prevents the use of a mouse. They may have a neurological condition that makes reading a quickly rotating hero difficult or they may have an intellectual disability and need clear instructions in order to understand how to fill in the input fields on your website’s forms.

This segment of your users may be larger than you think, and if your website is not accessible to them, they will struggle to access or understand the information they need on your site—and may even turn to competitors with more accessible websites.

The overall goal of creating an accessible website is preventing barriers – to content and information, and limiting confusion and frustration. By striving to create an ADA-compliant and accessible website, you’re ultimately benefiting all users by ensuring your site is easy to understand and easy to navigate.

How ADA Compliance Factors Into Optimization

It can be easy to dismiss any A/B test code as simply temporary, and therefore doesn’t need to be ADA compliant. After all, it’s only running on your site for a short period of time.

However, consider the user who gets segmented into an inaccessible test variation. 

  • This may be their first visit to your site, and if they can’t navigate the site in the variation they are segmented into, they may not return to your site.
  • This may be the visit in which a user was planning to make a large purchase, or they may need access to important information on the website—but because of an inaccessible A/B test, they are unable to navigate the site.

Regardless of how temporary your test may be, it is live code running on your site that users will be coming in contact with—and it should be functional for all users.

Things to keep in mind when creating accessible mock-ups and writing code for A/B tests

Ideally, your team will follow all WCAG guidelines with every A/B test you build. However, in creating A/B tests there are accessibility issues that tend to crop up more than others. Here is our advice for designers and developers when building A/B tests.

For designers:

  1. Use contrasting colors with a contrast ratio of at least 4.5:1 in your designs. This ensures text is readable against its background.
  2. Ensure color is not the only means of communicating information. For example, an input field with an error that turns red will not be clear to somebody who is colorblind, and there may not be enough helpful information in the color change to convey what has happened, even for users who can see that the field has turned red. There should always be accompanying text explaining the error with suggestions on how the user can correct it.
  3. Any new forms or input fields added for the test should be properly labeled so users know what to expect.
  4. Avoid auto-playing audio and limit flashes. Ensure that any content that moves, blinks, or scrolls is able to be controlled by the user at a pace that is comfortable for them.

For Developers:

  1. Include alt tags with clear, descriptive text on all images. This ensures screen readers can convey information about the image to users with visual impairments
  2. Use proper markup techniques. This is easy to ignore with A/B tests where you may be moving around content or inserting content in new places. However, assistive technologies use markup to convey information on the page to users, so take the time to ensure heading tags are in a logical order and ordered and unordered lists are used appropriately.
  3. Avoid adding images with text built into them. Instead, use a background image and add any text to it in the HTML.
  4. Ensure all content is accessible with a keyboard. This is especially important to keep in mind (and easy to forget to do) when adding new modules, such as modals or input fields, onto a page for an A/B test. Ensure that you can tab through all the added content and that tabbing from any default content to the added content and back again happens in a logical way. Make sure that it is clear to users which element is in focus.

Keeping your website tests ADA compliant can feel overwhelming, especially if accessibility isn’t something your team has considered much in the past. However, the benefits—both to your company’s reputation and abidance of the law—and to your users, in having an easy to navigate the website, regardless of what test experiences they may find themselves in—make ADA compliance worth the time and effort.