Rule 1.4.2

Summary

This test consists in detecting captcha area and thus defining the applicability of the test.

Human check will be then needed to determine whether the alternative is pertinent.

Business description

Criterion

1.4

Test

1.4.2

Description

Pour chaque zone (balise <area>) d’une image réactive utilisée comme CAPTCHA ou comme image-test, ayant une alternative textuelle, cette alternative est-elle pertinente ?

  • S’il est présent, le contenu de l’attribut alt est pertinent.
  • S’il est présent, le contenu de l’attribut title est pertinent.
  • S’il est présent, le contenu de l’attribut WAI-ARIA aria-label est pertinent.
  • S’il est présent, le passage de texte associé via l’attribut WAI-ARIA aria-labelledby est pertinent.

Level

A

Technical description

Scope

Page

Decision level

Semi-Decidable

Algorithm

Selection

Set1

All the <area> tags, defined within a <map> tag whose the "id" attribute corresponds to the "usemap" attribute of an <img> tag, not within a link

Set2

All the elements of Set1 identified as a CAPTCHA (see Notes for details about CAPTCHA characterisation).

Set3

All the elements of Set2 with a textual alternative (see Notes for details about textual alternative detection).

Process

For each element of Set3, raise a MessageA

MessageA : Check captcha alternative

  • code : CheckCaptchaAlternative
  • status: Pre-Qualified
  • parameter : "alt" attribute, "title" attribute, "aria-label" attribute, "computed accessible name", "href" attribute
  • present in source : yes

Analysis

Not Applicable

The page has no <area> tag of an image map with a textual alternative, identified as a captcha (Set3 is empty)

Pre-qualified

In all other cases

Notes

Captcha detection

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 aria-labelledby WAI-ARIA attribute
  • Presence of an aria-label WAI-ARIA attribute
  • Presence of an alt attribute

That order has to be respected to compute the textual alternative.

For instance, if an aria-label WAI-ARIA attribute and an alt attribute are both present, the content of the aria-label WAI-ARIA attribute is considered as the textual alternative.

Files