Skip to content

Commit b0e0fe2

Browse files
kengdojdrewnielson
andauthored
added 5.B Roles test for user controls (#469)
* added 5.B * edits * minor edit * html * edits * Update _baselines/05Controls.md * Apply suggestions from code review * Update _baselines/05Controls.md Co-authored-by: Andrew Nielson <29068131+drewnielson@users.noreply.github.com> * Update 05Controls.md * state test updates * Update _baselines/05Controls.md * Update _baselines/05Controls.md --------- Co-authored-by: Andrew Nielson <29068131+drewnielson@users.noreply.github.com>
1 parent beff9bd commit b0e0fe2

2 files changed

Lines changed: 33 additions & 11 deletions

File tree

_baselines/05Controls.md

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ order-number: 6
1212

1313
The purpose of this Baseline test is to check the following accessibility properties of user controls:
1414
- Name
15-
- Role (test not yet available)
15+
- Role
1616
- State
1717
- Value
1818

@@ -21,6 +21,9 @@ The purpose of this Baseline test is to check the following accessibility proper
2121
- [User interface component](https://www.w3.org/TR/WCAG22/#dfn-user-interface-components) is a part of the content that is perceived by users as a single control for a distinct function. User interface components include form elements and links as well as components generated by scripts. This test uses the term "user controls" for brevity.
2222
- The accessibility properties of the user control must be correct if the user control changes.
2323
- Per [WCAG 2.2 Understanding SC 1.4.1 Use of Color](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color) authors cannot set the visited state of links. The anchor element does not include a "visited" attribute; therefore the author has no ability to alter the state through an attribute setting. Exclude visited/unvisited state of links from this Baseline test.
24+
- [Widget Roles of Accessible Rich Internet Applications (WAI-ARIA)](https://www.w3.org/TR/wai-aria/#widget_roles) lists roles that may be used for user controls. A "widget" is a "discrete user interface object with which the user can interact. Widgets range from simple objects that have one value or operation (e.g., check boxes and menu items), to complex objects that contain many managed sub-objects (e.g., trees and grids)."
25+
- [Widget Attributes of Accessible Rich Internet Applications (WAI-ARIA)](https://www.w3.org/TR/wai-aria/#attrs_widgets) lists state and property attributes for user interface elements found on GUI systems or in rich internet applications which receive user input and process user actions. These attributes are used to support the widget roles. The WAI ARIA specification explains "the values of properties (such as aria-labelledby) are often less likely to change throughout the application life-cycle than the values of states (such as aria-checked) which may change frequently due to user interaction."
26+
- In the Baseline Test instructions, where an ARIA role is identified, it is the first valid ARIA role attribute value.
2427

2528
### 5.A Test Procedure for Control Name
2629

@@ -29,7 +32,6 @@ The purpose of this Baseline test is to check the following accessibility proper
2932
#### Identify Content
3033
<p id="5aIC">Identify user controls for a distinct function. Exclude forms and links as these are covered by <a href="../10Forms">Baseline 10. Forms</a> and <a href="../14Links"> Baseline 14. Links</a>, respectively.</p>
3134

32-
3335
#### Test Instructions
3436
<ol id="5aTI">
3537
<li id="5aTI-1">Check that the combination of the accessible name and accessible description is not empty. [SC 4.1.2]</li>
@@ -43,7 +45,7 @@ The purpose of this Baseline test is to check the following accessibility proper
4345
<li><a href="https://www.w3.org/TR/html-aam-1.0/#accdesc-computation" target="_blank" rel="noopener">HTML Accessibility API Mappings for Accessible Description Computation</a></li>
4446
</ul>
4547
</li>
46-
<li id="5aTI-3">If the name of the user control changes with use of the application, repeat the previous test steps and check that the accessible name is correct after the change. [SC 4.1.2]
48+
<li id="5aTI-3">If the name of the user control changes on user interaction with the web content or application, repeat the previous test steps and check that the accessible name is correct after the change.
4749
<ul>
4850
<li>Depending on the control, a change of name may be triggered by various actions, such as changing values or states of other components, toggling a function, entering data in the component, mouseover, etc.</li>
4951
<li>Examples include entering a response in a form field for country changes the next form field's label from "state" to "province", selecting a control toggles its functionality from sorting ascending to descending, a link appends "Updated" to its name when the linked page is edited.</li>
@@ -55,46 +57,65 @@ The purpose of this Baseline test is to check the following accessibility proper
5557

5658
<p id="5aTR">If any of the above checks fail, then Baseline Test 5.A-ControlName fails.</p>
5759

58-
### 5.B Test Procedure for Control Role (not available)
60+
### 5.B Test Procedure for Control Role
61+
62+
**Baseline Test ID: 5.B-ControlRole
63+
64+
#### Identify Content
65+
<p id="5bIC">Identify user controls for a distinct function that have an explicit role attribute (<code>role="[value]"</code>). Examples include forms, links, and toggle controls.</p>
66+
67+
#### Test Instructions
68+
<ol id="5bcTI">
69+
<li id="5bTI-1">Check that the role of the user control is valid and appropriate for its function. [SC 4.1.2]
70+
<ul>
71+
<li>Only the roles listed in <a href="https://www.w3.org/TR/wai-aria/#widget_roles">Accessible Rich Internet Applications (WAI-ARIA) Section 5.3.2 Widget Roles</a> are valid for user controls.</li>
72+
</ul>
73+
</li>
74+
</ol>
75+
76+
#### Test Results
77+
78+
<p id="5bTR">If any of the above checks fail, then Baseline Test 5.B-ControlRole fails.</p>
5979

6080
### 5.C Test Procedure for Control State
6181

6282
**Baseline Test ID:** 5.C-ControlState
83+
6384
#### Identify Content
64-
<p id="5cIC">Identify user controls for a distinct function. Examples include changes to forms, links, and toggle controls. Exclude the visited/unvisited state of links.</p>
65-
85+
<p id="5cIC">Identify user controls for a distinct function that can be set by the user. Examples of such user controls include those that can be checked, expanded, hidden, and pressed. Exclude the visited/unvisited state of links.</p>
6686

6787
#### Test Instructions
6888
<ol id="5cTI">
69-
<li id="5cTI-1">Check that the state of the user control is correct. Attributes such as <code>hidden</code>, <code>disabled</code>, and the use of <a href="https://www.w3.org/WAI/standards-guidelines/aria/">WAI-ARIA</a> to control component states must be used correctly.[SC 4.1.2]</li>
89+
<li id="5cTI-1">Check that the state of the user control is correct. Attributes such as <code>hidden</code>, <code>disabled</code>, and the use of <a href="https://www.w3.org/TR/wai-aria/#attrs_widgets">WAI-ARIA state attributes</a> must be used correctly. [SC 4.1.2]</li>
7090
<li id="5cTI-2">If the state of the user control changes with use of the application, check that the state of the user control is correct after a change of state. [SC 4.1.2]
7191
<ul>
7292
<li>Depending on the control, a change of state may be triggered by various actions, such as changing values or states of other components, toggling a function, entering data in the component, mouseover, etc.</li>
73-
<li>Examples include a disabled "Submit" button is enabled when all required form fields are filled in, a link becomes visible after a user-initiated calculation completes, a check box changes from checked to unchecked, links that are hovered or visited.</li>
93+
<li>Examples include a disabled "Submit" button is enabled when all required form fields are filled in, a link becomes visible after a user-initiated calculation completes, a check box changes from checked to unchecked, a table column sort control is toggled from ascending to descending.</li>
7494
</ul>
7595
</li>
7696
</ol>
7797

7898
#### Test Results
7999

80-
<p id="5cTR">If any of the above checks fail, then Baseline Test 5.2-ControlState fails.</p>
100+
<p id="5cTR">If any of the above checks fail, then Baseline Test 5.C-ControlState fails.</p>
81101

82102
### 5.D Test Procedure for Control Value
83103

84104
**Baseline Test ID:** 5.D-ControlValue
105+
85106
#### Identify Content
86107
<p id="5dIC">Identify controls that have a value that can be changed by a user. Examples include form fields and sliders.</p>
87108

88109
#### Test Instructions
89110
<ol id="5dTI">
90111
<li id="5dTI-1">Check that the value of the user control is correct. [SC 4.1.2]</li>
91112
<li id="5dTI-2">Modify the value of the user control. Depending on the control, a change of value may be performed by entering a number, selecting from a list of options, etc.</li>
92-
<li id="5dTI-3">Check that the value of the user control is correct after a change of value. [SC 4.1.2]</li>
113+
<li id="5dTI-3">Check that the value of the user control is correct after the user-initiated change of value. [SC 4.1.2]</li>
93114
</ol>
94115

95116
#### Test Results
96117

97-
<p id="5dTR">If any of the above checks fail, then Baseline Test 5.3-ControlValue fails.</p>
118+
<p id="5dTR">If any of the above checks fail, then Baseline Test 5.D-ControlValue fails.</p>
98119

99120
### Advisory: Tips for streamlined test processes
100121

_baselines/ChangeLog3.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Note: Minor punctuation, formatting and spelling changes not included.
1616
| 2. Focus | Accessibility Requirements: SC 3.2.1 replaced "component" with "user interface component" per [WCAG 2.0 Errata](https://www.w3.org/WAI/WCAG20/errata/) Editorial Errata 9. |
1717
| 3.A Non-Interference | Identify Content: added links to Baseline Tests. |
1818
| 5. User Controls | Was Changing Content. New test to cover SC 4.1.2 more accurately. |
19+
| 5.B Control Role | New test |
1920
| 5.C Control State | Identify Content: excluded state of visited/unvisited links. |
2021
| 6. Images | Limitations, Assumptions, Exceptions: removed "Equivalent descriptions for an image within page text could allow an image to be considered decorative. However, this does not necessitate removal of any accessible text attributes from the image." |
2122
| 6. Images | Test Method Rationale: added "The image tests evaluate the images as they were coded to indicate whether they are meaningful or decorative, leaving that determination to the author of the content. However, there are certain scenarios as described in the tests where the author's determination would be incorrect." |

0 commit comments

Comments
 (0)