forked from w3c/wcag-act
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NOTE-act-rules-common-aspects.bs
71 lines (45 loc) · 6.44 KB
/
NOTE-act-rules-common-aspects.bs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<pre class='metadata'>
Title: Accessibility Conformance Testing Rules: Common Input Aspects
Shortname: ACT-Common-Aspects
URL: https://w3c.github.io/wcag-act/NOTE-act-rules-common-aspects.html
Previous Version: https://w3c.github.io/wcag-act/archive_act-format/NOTE-act-rules-common-aspects.html
Level: 1.0
Status: ED
TR: https://www.w3.org/TR/
Group: act-framework
Editor: Wilco Fiers, Deque Systems
Editor: Maureen Kraft, IBM Corp.
Editor: Mary Jo Mueller, IBM Corp.
Editor: Shadi Abou-Zahra, W3C
Abstract: This document is a companion to the [Accessibility Conformance Testing (ACT) Rules Format 1.0](https://www.w3.org/TR/act-rules-format/) specification. It lists common input aspects as defined by the ACT Rules Format 1.0 specification. This document is informative. It provides a reference to well defined input aspects to assist authors in writing ACT Rules and to support the consistency of ACT Rules.
Markup Shorthands: markdown yes
</pre>
Introduction {#intro}
=====================
The term [Input Aspects](https://www.w3.org/TR/act-rules-format/#input-aspects) is defined by the [Accessibility Conformance Testing (ACT) Rules Format 1.0 Specification](https://www.w3.org/TR/act-rules-format/). An input aspect is a distinct part of a [test subject](https://www.w3.org/TR/act-rules-format/#test-subject). Atomic rules are required to list input aspects in the [applicability](https://www.w3.org/TR/act-rules-format/#applicability) and [expectations](https://www.w3.org/TR/act-rules-format/#expectations).
Some input aspects are already well defined in a formal specification within the context of web content, such as HTTP messages, DOM tree, and [CSS Styling](https://www.w3.org/TR/css/). These do not warrant a detailed description in ACT Rules Format 1.0 specification. Instead, these are listed in this informative document, which can be updated more easily. Atomic rules can refer to one of these common input aspects, however, these common input aspects are not required to conform to the ACT Rules Format 1.0 specification.
Examples of ACT Rules can be found in the [ACT Rules Repository](https://w3c.github.io/wcag-act-rules/).
The input aspects listed in this document can be used by authors of ACT Rules to refer to common types more easily. This improves the development process and supports consistency across rules. This list can be extended and refined at any time, for example, to include popular input aspects or to provide clarification. Existing input aspects can also be marked as obsoleted, if needed.
Common Input Aspects {#input-aspects-common}
============================================
HTTP Messages {#input-aspects-http}
-----------------------------------
The HTTP messages [[http11]] exchanged between a client and a server as part of requesting a web page may be of interest to ACT Rules. For example, analyzing HTTP messages to perform validation of HTTP headers or unparsed HTML [[HTML]] and [Cascading Style Sheets](https://www.w3.org/TR/css/).
DOM Tree {#input-aspects-dom}
----------------------------
The DOM [[DOM]] tree constructed from parsing HTML [[HTML]], and optionally executing DOM manipulating JavaScript, may be of interest to ACT Rules to test the structure of web pages. In the DOM tree, information about individual elements of a web page, and their relations, becomes available.
The means by which the DOM tree is constructed, be it by a web browser or not, is not of importance as long as the construction follows the [Document Object Model](https://dom.spec.whatwg.org) [[DOM]].
CSS Styling {#input-aspects-css}
--------------------------------
The computed [CSS Styling](https://www.w3.org/TR/css/) resulting from parsing CSS and applying it to the DOM [[DOM]] may be of interest to ACT Rules that wish to test the web page as presented to the user. Through CSS styling, information about the position, the foreground and background colors, the visibility, and more, of elements becomes available.
The means by which the CSS styling is computed, be it by a web browser or not, is not of importance as long as the computation follows any applicable specifications that might exist, such as the [CSS Object Model](https://www.w3.org/TR/cssom/) [[CSSOM]].
The test cases of ACT Rules interested in the CSS styling must be viewed with the CSS included by the author, and the [user agent default style sheet](https://drafts.csswg.org/css-cascade/#cascade-origin-ua). [User style sheets](https://drafts.csswg.org/css-cascade/#cascade-origin-user) and other custom styles should be avoided to ensure test cases have the expected outcome.
Accessibility Tree {#input-aspects-accessibility}
-------------------------------------------------
The accessibility tree constructed from extracting information from both the DOM [[DOM]] tree and the [CSS Styling](https://www.w3.org/TR/css/) may be of interest to ACT Rules. This can be used to test the web page as presented to assistive technologies such as screen readers. Through the accessibility tree, information about the semantic roles, accessible names and descriptions, and more, of elements becomes available.
The means by which the accessibility tree is constructed, be it by a web browser or not, is not of importance as long as the construction follows any applicable specifications that might exist, such as the [Core Accessibility API Mappings 1.1](https://www.w3.org/TR/core-aam-1.1/) [[CORE-AAM-1.1]].
Language {#input-aspects-text}
------------------------------
Language, either written or spoken, contained in nodes of the DOM [[DOM]] or accessibility trees may be of interest to ACT Rules that intend to test things like complexity or intention of the language. For example, an ACT Rule might test that paragraphs of text within the DOM tree do not exceed a certain readability score or that the text alternative of an image provides a sufficient description.
Rules can only operate on the Language aspect if the language of a page can be determined. The means by which the language is assessed, whether by a person or a machine, is not of importance as long as the assessment meets the criteria defined in [[wcag2-tech-req#humantestable]] [[WCAG]].
Some rules can only operate on a Language aspect if the language is sufficiently understood, while other rules only require identifying the language. For example, a rule checking that an accessible name is descriptive can only function if the language is understood. A rule checking the correctness of a `lang` attribute requires knowing what language is used, but not the meaning of the words.