Sc4 1 2 Button
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 | Value |
---|---|
Success Criterion | 4.1.2 Name, Role, Value |
Test mode | automatic |
Test environment | DOM |
Test subject | single web page |
Test procedure
Selector
Test mode: automatic
Select any button element. The following CSS selector could be used: button
Step 1
Test mode: automatic
- IF there is non-empty text within the button element:
- Return SC4-1-2-button-pass;
- IF the button element has a title attribute with a non-empty value:
- Return SC4-1-2-button-pass;
- ELSE Return SC4-1-2-button-fail;
Outcome | Passed |
---|---|
Testcase | SC4-1-2-button |
ID | SC4-1-2-button-pass |
Outcome | Failed |
---|---|
Testcase | SC4-1-2-button |
Error | failed to give an anchor element a name |
Info | This button element has no filled title attribute nor text content. |
ID | SC4-1-2-button-fail |