Asqatasun v4 - RGAA 3.2016 - Rule 11.1.1
Summary
This test consists in checking whether each form input has a label (implicit or explicit) or a "title", "aria-label" or "aria-labelledby" attribute
Business description
Criterion
Test
Description
- Le champ de formulaire possède un attribut
title; - Une étiquette (balise
label) est associée au champ de formulaire ; - Le champ de formulaire possède une propriété
aria-label; - Le champ de formulaire possède une propriété
aria-labelledbyréférençant un passage de texte identifié.
Level
A
Technical description
Scope
Page
Decision level
Decidable
Algorithm
Selection
Set1 (input form fields)
All the <input> tags within a <form> tag with a "type" attribute equals to: - "text" - or "password" - or "checkbox" - or "radio" - or "file" - or "search" - or "tel" - or "email" - or "number" - or "url" - or "date" - or "range" - or "color" - or "time"
AND all the <textarea>, <select>, <datalist>, <keygen> tags
Set2
All the elements of Set1 without "title", "aria-label" or "aria-labelledby" attribute
Set3
All the elements of Set2 with no <label> tag as parent
Set4
All the elements of Set3 with no <label> associated through its "for" attribute
Process
Tests
Test1
For each element of Set4, raise a MessageA
Messages
MessageA : Form field without label
- code : InvalidFormField
- status: Failed
- parameter : tag name
- present in source : yes
Analysis
Not Applicable
The page has no form input (Set1 is empty)
Passed
All the form inputs have either a label, or a "title" attribute, or a "aria-label" attribute, or a "aria-labelledby" attribute (Set4 is empty)
Failed
At least one form input have neither a label, nor a "title" attribute, nor a "aria-label" attribute, nor a "aria-labelledby" attribute (Set4 is not empty)