Accessibility testing starts where the audit ends

Accessibility

Accessibility checks became more useful to me when I stopped treating them as the last step.

A tool can tell me that an element has an accessible name, that markup satisfies a rule, or that a particular failure can be detected automatically. That is useful. More importantly, it is repeatable: if something can be checked every time the interface changes, I would rather have the codebase catch it than rely on myself remembering it.

But I kept finding that the more interesting questions appeared afterwards.

Not necessarily because an attribute was missing or a rule had been violated, but because using the interface differently exposed assumptions I had built into it without noticing.

There was often a gap between what I thought I had designed and what the browser was actually exposing.

An accessible name is part of the interface

aria-label was a small example that changed how I thought about this.

It is easy to imagine ARIA as additional information: something invisible that you attach to an otherwise finished component to make it more accessible. But an accessible name is not a comment attached to the interface. It is part of the interface.

Depending on the element, adding an aria-label can replace the name that would otherwise have been derived from its visible content. Something intended to provide more information can therefore end up exposing different information.1 That distinction sounds obvious once you know it. It wasn’t obvious to me while thinking about ARIA as metadata.

And that is what made the example useful.

I had approached the change as if I were adding an annotation. In reality, I was modifying one of the representations of the component.

I am now much more cautious about adding ARIA simply because it appears to make something “more accessible”. Sometimes the native semantics or visible content already provide what is needed. Sometimes an ARIA attribute genuinely improves the result. And sometimes it changes something you did not realise you were changing.

Changing an accessible name can be as consequential as changing visible copy for the users who receive it.

A focus ring does not make the interaction equivalent

Another seam appeared around interaction states.

Some components already had useful behaviour on hover: additional information appeared, emphasis changed, or an interactive affordance became clearer.

Then I navigated the same interface with the keyboard.

Having a visible focus ring did not automatically make the experience equivalent. The question became:

what information or behaviour had I accidentally made dependent on having a pointer?

That cannot really be answered by looking at a component in its resting state. You have to move through it. And once I started thinking about the problem in those terms, hover versus focus felt too narrow as well…

What happens on touch?

There is no hover in the same sense. The problem was not that I had forgotten to duplicate one CSS state into another. The deeper problem was that I had designed part of the interaction around the device I happened to be using while building it.

A focus state is not just accessibility decoration around the “real” mouse interaction. It is another way of travelling through the interface. And touch is another one again.

Replacing appearance can mean replacing behaviour

The same idea becomes more obvious with native controls.

Modern interfaces spend a lot of effort moving away from browser defaults. Sometimes for good reason. A completely native control does not always fit the visual language you are trying to build.

But the more I explored accessibility, the more I noticed that the browser default was rarely just visual.

  • A button already behaves like a button.
  • An input participates in keyboard navigation.
  • Different input types can affect what a mobile device presents to the user.
  • A native select comes with an interaction model that I did not have to invent myself.
When I replace one of those things with a completely custom component, I am not only replacing its appearance. I may also be taking responsibility for behaviour that the browser previously handled for me.2

Keyboard interaction. Focus. State. Semantics. Sometimes differences between desktop and mobile that are easy to miss while designing the component from a static mock-up. This creates an interesting tension for the kind of interfaces I like building.

I do not think the answer is to stop creating custom interactions and accept browser defaults everywhere. That would turn accessibility into a restriction on visual language, which is not particularly useful either. The question I find more interesting is:

which parts of the browser’s behaviour am I replacing along with its appearance?

The more control I take over the component, the more of that question becomes mine to answer.

It also made me realise that the page I see rendered in my browser is not the whole interface. The browser, operating system, input device and user preferences are participating in it too.

That leads to a harder question than fixing whatever an audit reports:

When do you stop?

I am used to working on projects where accessibility is an explicit concern. On my own portfolio, nobody gave me a required testing procedure or told me how far I had to go.

So how much is enough?

“Make everything accessible” is an understandable aspiration, but it is not a particularly useful instruction when you are making engineering decisions. I cannot test every browser, viewport, input method, assistive technology and user context. Neither can an automated tool.

And I do not think the same level of assurance necessarily makes sense for every product. A personal portfolio, a public service and a tool someone depends on for an essential daily task do not carry the same context or consequences. That does not make accessibility optional. If anything, it has made me separate two questions that I previously mixed together.

What should simply be part of how I build an interface? And what additional level of testing does this particular product, audience or risk require?

Keyboard navigation, appropriate native elements, useful accessible names or not hiding necessary information behind hover increasingly belong to the first category for me. They do not feel like an accessibility pass I consciously add afterwards, they feel like properties of a robust interface.

The second category is harder. Testing with specific assistive technologies, exploring unusual combinations of settings, expert auditing or testing with people with disabilities can provide evidence that my own developer testing cannot. The answer therefore cannot just be “I ran more checks”. It has to depend partly on what I need to be confident about.

Accessibility and SEO answer different questions

There is another reason I think accessibility can become flattened into a checklist.

It is often grouped beside SEO, performance and all the other things that appear near the end of a web project. And there is genuine overlap. Semantic HTML can help machines understand a page, alternative text can be useful in more than one context, clear content and sensible structure rarely hurt either accessibility or discoverability, but the overlap can make the goals look more similar than they really are.

A search engine does not need to understand whether my interaction becomes confusing when navigating with a keyboard. It does not experience a feature that only exists on hover. It does not encounter a touch target with a thumb. So I would be uncomfortable treating accessibility primarily as another route to better SEO.

Sometimes the same implementation decision benefits both. That is useful.

It is not the reason the decision exists.

Checks verify properties; interaction reveals assumptions

I still want automated accessibility tests. Precisely because they are automated, they are repeatable, cheap to run and very good at preventing classes of known mistakes from silently returning. Turning something I know how to verify into an invariant of the codebase is better than remembering to inspect it manually every time.

But passing those checks answers a bounded question. Using the interface answers different ones.

  • Can I follow its sequence without a mouse?
  • Does information survive when hover disappears?
  • Did the accessible name become something different from what I intended?
  • Am I replacing only the visual appearance of a native control, or some of its behaviour too?
  • What changes when the device, input method or browser is no longer the one I designed around?

Those questions require interaction, and even those checks have an important limit. Testing my own work with a keyboard, zoom or assistive technology does not allow me to claim that the interface is accessible to everyone. Developer testing is not the same thing as an expert accessibility audit. And neither is the same thing as observing people with disabilities actually use the product.3

I do not want to collapse those things into one claim, what my own testing gives me is something smaller, but still valuable: another way of interrogating what I built. I started accessibility testing expecting to find accessibility errors. Increasingly, what I find are assumptions.

  • About input.
  • About devices.
  • About what the browser was doing for me.
  • About what an attribute actually changed.
  • About users I cannot completely predict.

Automated tests help me verify properties I already know to look for. Actually using the interface is often where I discover the assumptions I didn’t know I had made.

References

  1. 1

    W3C WAI, Providing Accessible Names and Descriptions. Explains accessible-name precedence and how aria-label can replace descendant content for roles named from their contents

  2. 2

    W3C WAI, ARIA Authoring Practices Guide: Read Me First. Distinguishes native browser behaviour from the semantics and keyboard interaction authors must supply for custom controls

  3. 3

    Playwright, Accessibility testing. States the limits of automated checks and recommends combining them with manual assessment and inclusive user testing