Warning:
This wiki has been archived and is now read-only.
SC4-1-2-button
From Automated WCAG Monitoring Community Group
Contents
Description
This test checks if every button element has a name.
Background
Assumptions
- The test case does not look at buttons with img content
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 any button element. The following CSS selector could be used: “button”
Step 1
Test mode:
earl:automatic
- IF there is non-empty text within the button element:
- Return SC412-button-pass;
- IF the button element has a title attribute with a non-empty value:
- Return SC412-button-pass;
- ELSE Return SC412-button-fail;
Property | Value |
---|---|
TestCase | SC412-button |
Identifier | SC412-button-pass |
Outcome | passed |
Pointer | position |
Info |
Property | Value |
---|---|
TestCase | SC412-button |
Identifier | SC412-button-fail |
Outcome | failed |
ErrorMessage | failed to give an anchor element a name |
Pointer | position |
Info | This button element has no filled title attribute nor text content. |