-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rule update: ARIA state/property has valid value #441
Changes from 7 commits
b180e95
0d4f5e2
2ab60f1
52ba4aa
dddcea7
b6bf083
fb68242
8f6342d
881dca8
3f72b8d
fdb60b4
7264ed1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
--- | ||
name: ARIA state or property has valid value | ||
name: Required ARIA property has valid value | ||
rule_type: atomic | ||
|
||
description: | | ||
This rule checks that each ARIA state or property has a valid value | ||
This rule checks that each required WAI-ARIA property has a valid value. | ||
|
||
success_criterion: | ||
- 4.1.2 # Name, Role, Value | ||
- 1.3.1 # Info and Relationships | ||
|
||
test_aspects: | ||
- DOM Tree | ||
|
@@ -21,26 +21,27 @@ authors: | |
|
||
### Applicability | ||
|
||
Any [non-empty](#non-empty) [WAI-ARIA 1.1 state or property](https://www.w3.org/TR/wai-aria-1.1/#state_prop_def) that is specified on an HTML or SVG element. | ||
Any [WAI-ARIA required state or property](https://www.w3.org/TR/wai-aria-1.1/#requiredState) that | ||
- is specified on an HTML or SVG element | ||
- is one of the `aria-*` attributes included in the [accessible name computation](https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_te), or is specified on an element that is [included in the accessibility tree](#included-in-the-accessibility-tree) or is [focusable](#focusable), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Accessible name computation can be removed. |
||
- is not the empty string (""), | ||
- does not have a default value listed under [WAI-ARIA implicit value for role](https://www.w3.org/TR/wai-aria-1.1/#implictValueForRole). | ||
|
||
### Expectation 1 | ||
### Expectation | ||
|
||
Each test target has a valid value according to its [WAI-ARIA 1.1 value type](https://www.w3.org/TR/wai-aria-1.1/#propcharacteristic_value). | ||
|
||
For value types `ID Reference` and `ID Reference List` for [WAI-ARIA required properties](https://www.w3.org/TR/wai-aria-1.1/#requiredState) at least one of the elements with the given ids exists in the same [document tree](https://www.w3.org/TR/dom41/#document-trees) or [shadow tree](https://www.w3.org/TR/dom41/#shadow-trees) as the element that specifies the target attribute. | ||
For value types `ID Reference` and `ID Reference List` at least one of the elements with the given ids exists in the same [document tree](https://www.w3.org/TR/dom41/#document-trees) or [shadow tree](https://www.w3.org/TR/dom41/#shadow-trees) as the element that specifies the target attribute. | ||
|
||
For value type `URI` the value matches the [generic URI syntax](https://www.ietf.org/rfc/rfc3986.txt). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is irrelevant now and can be removed. |
||
|
||
**Note:** Only for [WAI-ARIA required properties](https://www.w3.org/TR/wai-aria-1.1/#requiredState) with value types `ID Reference` and `ID Reference List` is there a requirement that the elements with the given ids actually exists. For non-required properties, this is not a requirement. | ||
|
||
**Note:** | ||
For value type `URI`, this rule does not require that the destination URI exists. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is irrelevant now and can be removed. |
||
|
||
## Assumptions | ||
|
||
- This rule assumes that elements that are not [included in the accessibility tree](#included-in-the-accessibility-tree) or are [focusable](#focusable) can still impact users. Therefore the applicability of this rule is not limited to [WAI-ARIA 1.1 states and properties](https://www.w3.org/TR/wai-aria-1.1/#state_prop_def) on elements that are included in the accessibility tree or are focusable. | ||
**Note:** For example, anything referenced through `aria-labelledby` does not have to be [included in the accessibility tree](#included-in-the-accessibility-tree) in order for it to become part of the [accessible name](#accessible-name). | ||
- The ARIA `state` or `property` is being used to comply to WCAG. | ||
- This rule assumes that elements that are not [included in the accessibility tree](#included-in-the-accessibility-tree) or are [focusable](#focusable) can still impact users if they are used for the [accessible name computation](https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_te). Therefore the applicability of this rule also includes `aria-*` attributes that participate in the accessible name computation as well as [WAI-ARIA properties](https://www.w3.org/TR/wai-aria-1.1/#state_prop_def) that are specified on elements that are included in the accessibility tree or are focusable. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand why there's a note on elements that are not included in the accessibility tree, but I don't understand why you point "or are focusable" ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Whole assumption removed now, since scope of rule has been changed once again. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is irrelevant now and can be removed. |
||
- The WAI-ARIA `property` is being used to comply to WCAG. | ||
|
||
## Accessibility Support | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The applicability now only refers to aria-controls and no other property. We could just state that in the applicability and the name of the rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ShadowBB , we discussed internally if that was the way forward for this rule.
While it's the only required property in WAI-ARIA 1.1, there could potentially also be roles and requirements specified in other standards, e.g. EPUB.
Having "broader" scoped rule could actually catch something in other standards, that maps to a completely different success criterion, I guess.
So I guess I am for your suggestions of limiting the rule to explicitly
aria-controls
, and then we can be completely sure what we are testing...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aria-controls
is required for the rolesscrollbar
andcombobox
. I have now limited the rule to only look foraria-required
on rolescrollbar
, sincecombobox
is a story of its own, see w3c/aria#716.