Warning:
This wiki has been archived and is now read-only.
SC1-3-1-radio-check
From Automated WCAG Monitoring Community Group
(Redirected from SC131-radiocheck)
Contents
Description
This test checks to see if all radio buttons and check boxes with the same name are grouped in a fieldset element.
Background
- H71: Providing a description for groups of form controls using fieldset and legend elements
- test H71-2
Assumptions
no known assumptions
Test properties
Property | Possible values |
---|---|
Success Criterion | 1.3.1 Info and Relationships |
Test mode | automatic |
Test environment | DOM |
Test subject | single web page |
Test procedure
Selector
Test mode:
earl:automatic
Select any radio buttons and check boxes. The following CSS selector could be used: "input[type=radio], input[type=checkbox]"
Step 1
Test mode:
earl:automatic
- IF there is no list 'checkednames':
- Create an empty list 'checkednames';
- IF the value of the name attribute of the selected input element exists in 'checkednames':
- Return SC131-radiocheck-pass;
- IF the selected element is a child of a fieldset element:
- Create an empty variable 'current fieldset';
- Put the fieldset the selected element is a child from into 'current fieldset';
- FOR every selected element:
- IF the selected element has the same value in the name attribute as the current selected element:
- IF the selected element is a child of the 'current fieldset' element:
- Continue;
- ELSE:
- Return SC131-radiocheck-fail1;
- IF the selected element is a child of the 'current fieldset' element:
- ELSE:
- IF the selected element is a child of the 'current fieldset' element:
- Return SC131-radiocheck-fail2;
- ELSE:
- Continue;
- IF the selected element is a child of the 'current fieldset' element:
- IF the selected element has the same value in the name attribute as the current selected element:
- Put the value of the name attribute of the selected input element into 'checkednames';
- Return SC131-radiocheck-pass;
Property | Value |
---|---|
TestCase | SC131-radiocheck |
Identifier | SC131-radiocheck-pass |
Outcome | passed |
Pointer | position |
Info |
Property | Value |
---|---|
TestCase | SC131-radiocheck |
Identifier | SC131-radiocheck-fail1 |
Outcome | failed |
ErrorMessage | failed to group elements in fieldset correctly |
Pointer | position |
Info | two radio button or check box input elements with the same name are not in the same fieldset |
Property | Value |
---|---|
TestCase | SC131-radiocheck |
Identifier | SC131-radiocheck-fail2 |
Outcome | failed |
ErrorMessage | failed to group elements in fieldsets correctly |
Pointer | position |
Info | two radiobutton or checkbox input elements within the same fieldset don't share the same name. |