Warning:
This wiki has been archived and is now read-only.
SC4-1-2-user-input
From Automated WCAG Monitoring Community Group
(Redirected from SC412-user-input)
Contents
Description
This test checks the existence of associated labels at every form control that take user input.
Background
- G131: Providing descriptive labels
- H44: Using label elements to associate text labels with form controls
- test G131-1
Assumptions
no known assumptions
Test properties
Property | Possible values |
---|---|
Success Criterion | 4.1.2 Name, Role, Value |
Test mode | automatic |
Test environment | DOM |
Test subject | single web page |
Test procedure
Selector
Test mode:
earl:automatic
Select every input element, except for elements of the type hidden, button, image and submit, as well as any select and textarea elements
Step 1
Test mode:
earl:automatic
- IF the current element has a non-empty label element associated to its id by a for attribute:
- Return SC412-user-input-pass;
- IF the current element has non-empty title attribute:
- Return SC412-user-input-pass;
- IF the current element has a non-empty aria-label attribute:
- Return SC412-user-input-pass;
- IF the current element has a aria-labelledby attribute that refers to an existing non-empty element:
- Return SC412-user-input-pass;
- ELSE Return SC412-user-input-fail;
Property | Value |
---|---|
TestCase | SC412-user-input |
Identifier | SC412-user-input-pass |
Outcome | passed |
Pointer | position |
Info |
Property | Value |
---|---|
TestCase | SC412-user-input |
Identifier | SC412-user-input-fail |
Outcome | failed |
ErrorMessage | failed to give an input element a name |
Pointer | position |
Info | This input element is missing a label element. |