This test consists in detecting captcha canvas and thus defining the applicability of the test.
Human check will be then needed to determine whether the alternative is pertinent.
<canvas> tags, not within a link
All the elements of Set1 identified as a CAPTCHA (see Notes for details about CAPTCHA characterisation).
All the elements of Set2 with a textual alternative (see Notes for details about textual alternative detection).
For each element of Set3, raise a MessageA
MessageA : Check captcha alternative
- code : CheckCaptchaAlternative
- status: Pre-Qualified
- parameter : tag text,
"computed accessible name",
- present in source : yes
The page has no
<canvas> tag with a textual alternative, identified as a captcha (Set3 is empty)
In all other cases
An element is identified as a CAPTCHA when the “captcha” occurrence is found :
- on one attribute of the element
- or within the text of the element
- or on one attribute of one parent of the element
- or within the text of one parent of the element
- or on one attribute of a sibling of the element
- or within the text of a sibling of the element
Textual alternative detection
The textual alternative can be set by the presence of any the following elements :
- Text associated via the
- Presence of an
- Presence of text within the tag
That order has to be respected to compute the textual alternative.
For instance, if an
aria-label WAI-ARIA attribute and some text within the tag are both present, the content of the
aria-label WAI-ARIA attribute is considered as the textual alternative.
If none of these elements are present, two other conditions exist to set the textual alternative :
- A link, or a button is present just before or just after the element
- A mechanism exists to let the user replace the element by an alternative content.