RGAA 3.0 - Rule 11.1.3
Summary
This test consists in checking the presence and the unicity of the "id"
attribute of each label associated with a form input tag through the "aria-labelledby"
attribute.
Business description
Criterion
Test
Description
Does each form field associated with a label, via the ARIA aria-labelledby property, meet the following conditions? The label has an id attribute
Level
A
Technical description
Scope
Page
Decision level
Decidable
Algorithm
Selection
Set1
All the input form tags with a "aria-labelledby"
attribute (form textarea[aria-labelledby] , form select[aria-labelledby] , form input[type=password][aria-labelledby] , form input[type=checkbox][aria-labelledby] , form input[type=file][aria-labelledby] , form input[type=text][aria-labelledby] , form input[type=radio][aria-labelledby])
Process
Tests
Test1
For each element of Set1, test if the "aria-labelled"
attribute is not empty.
For each occurence of false-result of Test1, raise a MessageA.
Test2
For each element of Set1, test if the value of the "aria-labelledby"
attribute corresponds to an existing "id"
on the page.
For each occurence of false-result of Test2, raise a MessageB.
Test3
For each element of Set1, test if the value of the "aria-labelledby"
attribute corresponds to a unique "id"
on the page.
For each occurence of false-result of Test2, raise a MessageC.
Messages
MessageA : Aria labelledby attribute present but empty
- code : AriaLabelledbyEmpty
- status: Failed
- parameter : tag name
- present in source : yes
MessageB : Form element without label
- code : FormElementWithoutLabel
- status: Failed
- parameter : tag name
- present in source : yes
MessageC : Form element with not unique label
- code : FormElementWithNotUniqueLabel
- status: Failed
- parameter : tag name
- present in source : yes
Analysis
Not Applicable
The page has no input form tag with a "aria-labelledby"
attribute (Set1 is empty)
Passed
All the form tags with a "aria-labelledby"
attribute are associated with their label correctly (Test1 AND Test2 AND Test3 return true for all elements)
Failed
At least one input form tag with a "aria-labelledby"
attribute is not associated with its label correctly (Test1 OR Test2 OR Test3 return false for at least one element)