What it is
Alfa is an open source accessibility conformance testing engine made by Siteimprove and published under the MIT licence. It is built on the W3C’s ACT Rules Format, a common way to write accessibility test rules so that different tools give the same answer.
- Project: github.com/Siteimprove/alfa
- The rule Supervisor uses: SIA-R65 on the Alfa hub
The one rule Supervisor uses
Supervisor uses one Alfa rule, SIA-R65: an element in the sequential focus order has visible focus. It belongs to WCAG success criterion 2.4.7, Focus Visible. People who use a keyboard need to see where they are on the page, and a site that removes the focus outline leaves them lost.
What Alfa does, and what Supervisor adds
Alfa works out which elements a keyboard user can reach with the Tab key, in order. That is the hard part to get right, and Supervisor takes the list from Alfa.
The rule’s own verdict comes from the page’s styles. A style that merely sets an outline counts as visible, whether or not anything shows on screen. So Supervisor decides from the screen:
- It presses a key first, because many sites show focus rings only to keyboard users.
- For each element, it takes a picture of the element and a little space around it.
- It gives the element keyboard focus for real and takes the picture again.
- If nothing changed, it compares the whole visible page in the same way, in case the focus style is drawn on a card around the element.
- If nothing changed there either, the element shows no visible focus, and it is reported.
An element that does not keep the focus, because a script takes it away, is not judged here. That is a different problem.
Limits
- Up to 40 elements in tab order are looked at on each page, for at most 40 seconds.
- It runs at the desktop size only, and not when a check follows a journey, because focusing every element could set off the page’s own form checks.
- Any change on screen counts as visible focus. The check does not measure whether the indicator is clear enough.
- It looks at the page as it loads. Elements that appear later, such as a menu that opens, are not covered.
Where the findings go
A finding has the rule id sia-r65 and the help text “Elements in the tab order must show where the keyboard focus is”. Findings for criterion 2.4.7 always wait for a person as “needs review” before they count in the accessibility statement.
Supervisor is an independent service. It is not affiliated with Siteimprove or the Alfa project.