Skip to content

Commit

Permalink
added 5.B Roles test for user controls (#469)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* Update 05Controls.md

* state test updates

* Update _baselines/05Controls.md

* Update _baselines/05Controls.md

---------

Co-authored-by: Andrew Nielson <[email protected]>
  • Loading branch information
kengdoj and drewnielson authored Apr 1, 2024
1 parent beff9bd commit b0e0fe2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 11 deletions.
43 changes: 32 additions & 11 deletions _baselines/05Controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ order-number: 6

The purpose of this Baseline test is to check the following accessibility properties of user controls:
- Name
- Role (test not yet available)
- Role
- State
- Value

Expand All @@ -21,6 +21,9 @@ The purpose of this Baseline test is to check the following accessibility proper
- [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.
- The accessibility properties of the user control must be correct if the user control changes.
- 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.
- [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)."
- [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."
- In the Baseline Test instructions, where an ARIA role is identified, it is the first valid ARIA role attribute value.

### 5.A Test Procedure for Control Name

Expand All @@ -29,7 +32,6 @@ The purpose of this Baseline test is to check the following accessibility proper
#### Identify Content
<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>


#### Test Instructions
<ol id="5aTI">
<li id="5aTI-1">Check that the combination of the accessible name and accessible description is not empty. [SC 4.1.2]</li>
Expand All @@ -43,7 +45,7 @@ The purpose of this Baseline test is to check the following accessibility proper
<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>
</ul>
</li>
<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]
<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.
<ul>
<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>
<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>
Expand All @@ -55,46 +57,65 @@ The purpose of this Baseline test is to check the following accessibility proper

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

### 5.B Test Procedure for Control Role (not available)
### 5.B Test Procedure for Control Role

**Baseline Test ID: 5.B-ControlRole

#### Identify Content
<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>

#### Test Instructions
<ol id="5bcTI">
<li id="5bTI-1">Check that the role of the user control is valid and appropriate for its function. [SC 4.1.2]
<ul>
<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>
</ul>
</li>
</ol>

#### Test Results

<p id="5bTR">If any of the above checks fail, then Baseline Test 5.B-ControlRole fails.</p>

### 5.C Test Procedure for Control State

**Baseline Test ID:** 5.C-ControlState

#### Identify Content
<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>

<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>

#### Test Instructions
<ol id="5cTI">
<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>
<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>
<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]
<ul>
<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>
<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>
<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>
</ul>
</li>
</ol>

#### Test Results

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

### 5.D Test Procedure for Control Value

**Baseline Test ID:** 5.D-ControlValue

#### Identify Content
<p id="5dIC">Identify controls that have a value that can be changed by a user. Examples include form fields and sliders.</p>

#### Test Instructions
<ol id="5dTI">
<li id="5dTI-1">Check that the value of the user control is correct. [SC 4.1.2]</li>
<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>
<li id="5dTI-3">Check that the value of the user control is correct after a change of value. [SC 4.1.2]</li>
<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>
</ol>

#### Test Results

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

### Advisory: Tips for streamlined test processes

Expand Down
1 change: 1 addition & 0 deletions _baselines/ChangeLog3.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Note: Minor punctuation, formatting and spelling changes not included.
| 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. |
| 3.A Non-Interference | Identify Content: added links to Baseline Tests. |
| 5. User Controls | Was Changing Content. New test to cover SC 4.1.2 more accurately. |
| 5.B Control Role | New test |
| 5.C Control State | Identify Content: excluded state of visited/unvisited links. |
| 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." |
| 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." |
Expand Down

0 comments on commit b0e0fe2

Please sign in to comment.