Rule 11.2.4

Summary

This test consists in detecting all forms fields that have a aria-labelledby attribute.

The control that checks that the aria-labelledby attribute identifies precisely the input it is associated with has to be done manually.

Business description

Criterion

11.2

Test

11.2.4

Description

Chaque passage de texte associé via l’attribut WAI-ARIA aria-labelledby permet-il de connaître la fonction exacte du champ de formulaire auquel il est associée ?

Particular cases (criterion 11.2)

Il existe une gestion de cas particulier pour le test 11.2.5 lorsque :

  • La ponctuation et les lettres majuscules sont présentes dans le texte de l’ intitulé visible : elles peuvent être ignorées dans le nom accessible sans porter à conséquence.
  • Le texte de l’ intitulé visible sert de symbole : le texte ne doit pas être interprété littéralement au niveau du nom accessible. Le nom doit exprimer la fonction véhiculée par le symbole (par exemple, “B” au niveau d’un éditeur de texte aura pour nom accessible “Mettre en gras”, le signe “>” en fonction du contexte signifiera “Suivant” ou “Lancer la vidéo”). Le cas des symboles mathématiques fait cependant exception (voir la note ci-dessous).

Note : si l’étiquette visible représente une expression mathématique, les symboles mathématiques peuvent être repris littéralement pour servir d’étiquette au nom accessible (ex. : “A>B”). Il est laissé à l’utilisateur le soin d’opérer la correspondance entre l’expression et ce qu’il doit épeler compte tenu de la connaissance qu’il a du fonctionnement de son logiciel de saisie vocale (“A plus grand que B” ou “A supérieur à B”).

Ce cas particulier s’applique également au test 11.9.3.

Level

A

Technical description

Scope

Page

Decision level

Semi-Decidable

Algorithm

Selection

Set1

All form fields with an aria-labelledby attribute:

  • All the following tags with an aria-labelledby attribute:
    • <datalist>
    • <meter>
    • <optgroup>
    • <option>
    • <output>
    • <progress>
    • <select>
    • <textarea>
  • AND all <input> tags with an aria-labelledby attribute and without type attribute (implicit type="text")
  • AND all <input> tags with an aria-labelledby attribute and with a type attribute equals to:
    • checkbox
    • or color
    • or date
    • or datetime-local
    • or file
    • or email
    • or month
    • or number
    • or password
    • or radio
    • or range
    • or search
    • or tel
    • or text
    • or time
    • or url
    • or week
  • AND all tags with an aria-labelledby attribute and with a role attribute equals to:
    • or checkbox
    • or combobox
    • or listbox
    • or progressbar
    • or option
    • or radio
    • or searchbox
    • or slider
    • or spinbutton
    • or switch
    • or textbox

css selector :

    datalist[aria-labelledby],
    meter[aria-labelledby],
    optgroup[aria-labelledby],
    option[aria-labelledby],
    output[aria-labelledby],
    progress[aria-labelledby],
    select[aria-labelledby],
    textarea[aria-labelledby],
    input[aria-labelledby]:not([type]), /* input tag without type attribute (implicit type="text") */
    input[type=checkbox][aria-labelledby],
    input[type=color][aria-labelledby],
    input[type=date][aria-labelledby],
    input[type=datetime-local][aria-labelledby],
    input[type=file][aria-labelledby],
    input[type=email][aria-labelledby],
    input[type=month][aria-labelledby],
    input[type=number][aria-labelledby],
    input[type=password][aria-labelledby],
    input[type=radio][aria-labelledby],
    input[type=range][aria-labelledby],
    input[type=search][aria-labelledby],
    input[type=tel][aria-labelledby],
    input[type=text][aria-labelledby],
    input[type=time][aria-labelledby],
    input[type=url][aria-labelledby],
    input[type=week][aria-labelledby],
    [role=checkbox][aria-labelledby],
    [role=combobox][aria-labelledby],
    [role=listbox][aria-labelledby],
    [role=progressbar][aria-labelledby],
    [role=option][aria-labelledby],
    [role=radio][aria-labelledby],
    [role=searchbox][aria-labelledby],
    [role=slider][aria-labelledby],
    [role=spinbutton][aria-labelledby],
    [role=switch][aria-labelledby],
    [role=textbox][aria-labelledby]

Process

Test1

The selection handles the process.

For each occurrence of the selection raise a MessageA

MessageA : Check Manually the elements
  • code: ManualCheckOnElements
  • status: Pre-Qualified
  • parameter: aria-labelledby attribute, tag name
  • present in source: yes

Analysis

Not Applicable

The page has no form field tag that have a aria-labelledby attribute (Set1 is empty)

Pre-qualified

In all other cases

Notes

  • We only detect the elements of the scope of the test to determine whether the test is applicable
  • All the described form elements are selected regardless the presence of an eventual parent form tag.

Files