From b180e951fbe8691dbb85a17b48eb0dbb3b24ea5b Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Thu, 14 Mar 2019 12:36:33 +0100 Subject: [PATCH 01/12] Rule update: ARIA state/property has valid value --- ...ed-aria-state-or-property-has-valid-value.md} | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) rename _rules/{SC4-1-2-aria-state-or-property-has-valid-value.md => SC-1-3-1-required-aria-state-or-property-has-valid-value.md} (86%) diff --git a/_rules/SC4-1-2-aria-state-or-property-has-valid-value.md b/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md similarity index 86% rename from _rules/SC4-1-2-aria-state-or-property-has-valid-value.md rename to _rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md index 24db4274c53..08fbe20c024 100644 --- a/_rules/SC4-1-2-aria-state-or-property-has-valid-value.md +++ b/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md @@ -1,12 +1,12 @@ --- -name: ARIA state or property has valid value +name: Required ARIA state or 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 state or property has a valid value success_criterion: -- 4.1.2 # Name, Role, Value +- 1.3.1 # Info and Relationships test_aspects: - DOM Tree @@ -21,24 +21,26 @@ 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 that is [included in the accessibility tree](#included-in-the-accessibility-tree), +- is not the empty string (""), and +- 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 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). -**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. ## 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. From 0d4f5e23011bf14047ddac6fe566b13afc9ba91a Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Mon, 18 Mar 2019 12:44:55 +0100 Subject: [PATCH 02/12] Create SC-4-1-2-ARIA-widget-state-has-valid-value.md --- ...4-1-2-ARIA-widget-state-has-valid-value.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 _rules/SC-4-1-2-ARIA-widget-state-has-valid-value.md diff --git a/_rules/SC-4-1-2-ARIA-widget-state-has-valid-value.md b/_rules/SC-4-1-2-ARIA-widget-state-has-valid-value.md new file mode 100644 index 00000000000..3114379fbf5 --- /dev/null +++ b/_rules/SC-4-1-2-ARIA-widget-state-has-valid-value.md @@ -0,0 +1,85 @@ +--- +name: ARIA widget state has valid value +rule_type: atomic + +description: | + This rule checks that each state for an ARIA widget has a valid value. + +success_criterion: +- 4.1.2 # Name, Role, Value + +test_aspects: +- DOM Tree +- CSS Styling + +authors: +- Anne Thyme Nørregaard +--- + +## Test Procedure + +### Applicability + +This rule applies to any [WAI-ARIA state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) that is not the empty string (""), and is specified on an HTML or SVG element that has a [WAI-ARIA widget role](https://www.w3.org/TR/wai-aria-1.1/#widget_roles) and is [included in the accessibility tree](#included-in-the-accessibility-tree). + +### 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). + +## Assumptions + +This rule assumes that the WAI-ARIA state has been specified with the intent of complying to WCAG. + +## Accessibility support + +*There are no major accessibility support issues known for this rule.* + +## Background + +- [Understanding Success Criterion 4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html) +- [ARIA5: Using WAI-ARIA state and property attributes to expose the state of a user interface component](https://www.w3.org/TR/2016/NOTE-WCAG20-TECHS-20161007/ARIA5) +- [WAI-ARIA 1.1, Definitions of States and Properties](https://www.w3.org/TR/wai-aria-1.1/#state_prop_def) +- [WAI-ARIA 1.1, Characteristics of States and Properties, Value](https://www.w3.org/TR/wai-aria/#propcharacteristic_value) + +## Test Cases + +### Passed + +#### Passed example 1 + +Description... + +```html + +``` + +#### Passed example 2 + +... + +### Failed + +#### Failed example 1 + +Description... + +```html + +``` + +#### Failed example 2 + +... + +### Inapplicable + +#### Inapplicable example 1 + +Description... + +```html + +``` + +#### Inapplicable example 2 +... From 2ab60f10ca2d8a6f896ae2d2759f11d45fb4e4a5 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Mon, 18 Mar 2019 13:10:27 +0100 Subject: [PATCH 03/12] Update and rename SC-4-1-2-ARIA-widget-state-has-valid-value.md to SC-4-1-2-widget-state-has-valid-value.md --- ...-value.md => SC-4-1-2-widget-state-has-valid-value.md} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename _rules/{SC-4-1-2-ARIA-widget-state-has-valid-value.md => SC-4-1-2-widget-state-has-valid-value.md} (67%) diff --git a/_rules/SC-4-1-2-ARIA-widget-state-has-valid-value.md b/_rules/SC-4-1-2-widget-state-has-valid-value.md similarity index 67% rename from _rules/SC-4-1-2-ARIA-widget-state-has-valid-value.md rename to _rules/SC-4-1-2-widget-state-has-valid-value.md index 3114379fbf5..26ca0443310 100644 --- a/_rules/SC-4-1-2-ARIA-widget-state-has-valid-value.md +++ b/_rules/SC-4-1-2-widget-state-has-valid-value.md @@ -1,9 +1,9 @@ --- -name: ARIA widget state has valid value +name: Required state for ARIA widget has valid value rule_type: atomic description: | - This rule checks that each state for an ARIA widget has a valid value. + This rule checks that each required state for an ARIA widget has a valid value. success_criterion: - 4.1.2 # Name, Role, Value @@ -20,7 +20,7 @@ authors: ### Applicability -This rule applies to any [WAI-ARIA state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) that is not the empty string (""), and is specified on an HTML or SVG element that has a [WAI-ARIA widget role](https://www.w3.org/TR/wai-aria-1.1/#widget_roles) and is [included in the accessibility tree](#included-in-the-accessibility-tree). +This rule applies to any [required](https://www.w3.org/TR/wai-aria-1.1/#requiredState) [WAI-ARIA state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) that is not the empty string (""), and is specified on an HTML or SVG element that has a [WAI-ARIA widget role](https://www.w3.org/TR/wai-aria-1.1/#widget_roles) and is [included in the accessibility tree](#included-in-the-accessibility-tree). ### Expectation @@ -28,7 +28,7 @@ Each test target has a valid value according to its [WAI-ARIA 1.1 value type](ht ## Assumptions -This rule assumes that the WAI-ARIA state has been specified with the intent of complying to WCAG. +This rule assumes that the WAI-ARIA state has been specified with the intent of complying to WCAG by changing the state from [default value](https://www.w3.org/TR/wai-aria-1.1/#implictValueForRole) for that role. ## Accessibility support From 52ba4aad82b3f83950f545f0169cdab9caa1ba32 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Mon, 18 Mar 2019 13:52:21 +0100 Subject: [PATCH 04/12] Update SC-1-3-1-required-aria-state-or-property-has-valid-value.md --- ...red-aria-state-or-property-has-valid-value.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md b/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md index 08fbe20c024..8127f691ba5 100644 --- a/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md +++ b/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md @@ -3,7 +3,7 @@ name: Required ARIA state or property has valid value rule_type: atomic description: | - This rule checks that each required WAI-ARIA state or property has a valid value + This rule checks that each required WAI-ARIA state or property has a valid value. success_criterion: - 1.3.1 # Info and Relationships @@ -22,13 +22,13 @@ authors: ### Applicability 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 that is [included in the accessibility tree](#included-in-the-accessibility-tree), -- is not the empty string (""), and -- does not have a default value listed under [WAI-ARIA implicit value for role](https://www.w3.org/TR/wai-aria-1.1/#implictValueForRole). +- 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), +- is not the empty string (""). -### 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). +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) or has a default value listed under [WAI-ARIA implicit value for role](https://www.w3.org/TR/wai-aria-1.1/#implictValueForRole). 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. @@ -39,9 +39,7 @@ For value type `URI`, this rule does not require that the destination URI exists ## 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). +- 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 1.1 states and 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. - The ARIA `state` or `property` is being used to comply to WCAG. ## Accessibility Support From dddcea78794dab3dc7fa0ca8805cea464b8b4ea0 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Mon, 18 Mar 2019 14:00:32 +0100 Subject: [PATCH 05/12] Update SC-1-3-1-required-aria-state-or-property-has-valid-value.md --- ...required-aria-state-or-property-has-valid-value.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md b/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md index 8127f691ba5..1a475e1aecc 100644 --- a/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md +++ b/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md @@ -1,9 +1,9 @@ --- -name: Required ARIA state or property has valid value +name: Required ARIA property has valid value rule_type: atomic description: | - This rule checks that each required WAI-ARIA state or property has a valid value. + This rule checks that each required WAI-ARIA property has a valid value. success_criterion: - 1.3.1 # Info and Relationships @@ -24,11 +24,12 @@ authors: 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), -- is not the empty string (""). +- 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 -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) or has a default value listed under [WAI-ARIA implicit value for role](https://www.w3.org/TR/wai-aria-1.1/#implictValueForRole). +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` 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. @@ -40,7 +41,7 @@ For value type `URI`, this rule does not require that the destination URI exists ## 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 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 1.1 states and 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. -- The ARIA `state` or `property` is being used to comply to WCAG. +- The ARIA `property` is being used to comply to WCAG. ## Accessibility Support From b6bf0830ed353ae2c4eb608da2ef18ec21c624cc Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Fri, 22 Mar 2019 17:31:01 +0100 Subject: [PATCH 06/12] Update SC-1-3-1-required-aria-state-or-property-has-valid-value.md --- ...C-1-3-1-required-aria-state-or-property-has-valid-value.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md b/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md index 1a475e1aecc..8704c713df4 100644 --- a/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md +++ b/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md @@ -40,8 +40,8 @@ For value type `URI`, this rule does not require that the destination URI exists ## 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 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 1.1 states and 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. -- The ARIA `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. +- The WAI-ARIA `property` is being used to comply to WCAG. ## Accessibility Support From fb68242f1e035557fdc50e9ad489cb87ebf7b262 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Fri, 22 Mar 2019 17:36:25 +0100 Subject: [PATCH 07/12] Delete SC-4-1-2-widget-state-has-valid-value.md --- .../SC-4-1-2-widget-state-has-valid-value.md | 85 ------------------- 1 file changed, 85 deletions(-) delete mode 100644 _rules/SC-4-1-2-widget-state-has-valid-value.md diff --git a/_rules/SC-4-1-2-widget-state-has-valid-value.md b/_rules/SC-4-1-2-widget-state-has-valid-value.md deleted file mode 100644 index 26ca0443310..00000000000 --- a/_rules/SC-4-1-2-widget-state-has-valid-value.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -name: Required state for ARIA widget has valid value -rule_type: atomic - -description: | - This rule checks that each required state for an ARIA widget has a valid value. - -success_criterion: -- 4.1.2 # Name, Role, Value - -test_aspects: -- DOM Tree -- CSS Styling - -authors: -- Anne Thyme Nørregaard ---- - -## Test Procedure - -### Applicability - -This rule applies to any [required](https://www.w3.org/TR/wai-aria-1.1/#requiredState) [WAI-ARIA state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) that is not the empty string (""), and is specified on an HTML or SVG element that has a [WAI-ARIA widget role](https://www.w3.org/TR/wai-aria-1.1/#widget_roles) and is [included in the accessibility tree](#included-in-the-accessibility-tree). - -### 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). - -## Assumptions - -This rule assumes that the WAI-ARIA state has been specified with the intent of complying to WCAG by changing the state from [default value](https://www.w3.org/TR/wai-aria-1.1/#implictValueForRole) for that role. - -## Accessibility support - -*There are no major accessibility support issues known for this rule.* - -## Background - -- [Understanding Success Criterion 4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html) -- [ARIA5: Using WAI-ARIA state and property attributes to expose the state of a user interface component](https://www.w3.org/TR/2016/NOTE-WCAG20-TECHS-20161007/ARIA5) -- [WAI-ARIA 1.1, Definitions of States and Properties](https://www.w3.org/TR/wai-aria-1.1/#state_prop_def) -- [WAI-ARIA 1.1, Characteristics of States and Properties, Value](https://www.w3.org/TR/wai-aria/#propcharacteristic_value) - -## Test Cases - -### Passed - -#### Passed example 1 - -Description... - -```html - -``` - -#### Passed example 2 - -... - -### Failed - -#### Failed example 1 - -Description... - -```html - -``` - -#### Failed example 2 - -... - -### Inapplicable - -#### Inapplicable example 1 - -Description... - -```html - -``` - -#### Inapplicable example 2 -... From 8f6342dac21274eb86d31bf3b89f991ca6a9c959 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 27 Mar 2019 09:21:46 +0100 Subject: [PATCH 08/12] Updated test cases to match new appl/exp. --- ...-aria-state-or-property-has-valid-value.md | 194 +++--------------- 1 file changed, 31 insertions(+), 163 deletions(-) diff --git a/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md b/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md index 8704c713df4..ce0c5314ed1 100644 --- a/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md +++ b/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md @@ -1,9 +1,9 @@ --- -name: Required ARIA property has valid value +name: Required aria-conrols has valid value rule_type: atomic description: | - This rule checks that each required WAI-ARIA property has a valid value. + This rule checks that each required `aria-controls` property has a valid value. success_criterion: - 1.3.1 # Info and Relationships @@ -21,27 +21,24 @@ authors: ### Applicability -Any [WAI-ARIA required state or property](https://www.w3.org/TR/wai-aria-1.1/#requiredState) that +Any [WAI-ARIA required](https://www.w3.org/TR/wai-aria-1.1/#requiredState) `aria-controls` property 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), -- 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). +- is specified on an element that is [included in the accessibility tree](#included-in-the-accessibility-tree) or is [focusable](#focusable), +- has a value that is not the empty string (""). -### Expectation +### Expectation 1 -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). +Each test target has a value that is a list of one or more `id` references. -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. +**Note:** [ID reference](https://www.w3.org/TR/wai-aria-1.1/#valuetype_idref_list) is the [value type](https://www.w3.org/TR/wai-aria-1.1/#propcharacteristic_value) specified for the property `aria-controls`. -For value type `URI` the value matches the [generic URI syntax](https://www.ietf.org/rfc/rfc3986.txt). +### Expectation 2 -**Note:** -For value type `URI`, this rule does not require that the destination URI exists. +At least one of `id`s referenced by the test target is specified on an HTML or SVG element that 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. ## 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 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. -- The WAI-ARIA `property` is being used to comply to WCAG. +_There are currently no assumptions for this rule._ ## Accessibility Support @@ -49,11 +46,10 @@ _There are no major accessibility support issues known for this rule._ ## Background -- [Understanding Success Criterion 4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html) +- [Understanding Success Criterion 1.3.1: Info and Relationships](https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships.html) - [ARIA5: Using WAI-ARIA state and property attributes to expose the state of a user interface component](https://www.w3.org/TR/2016/NOTE-WCAG20-TECHS-20161007/ARIA5) - [WAI-ARIA 1.1, Definitions of States and Properties](https://www.w3.org/TR/wai-aria-1.1/#state_prop_def) - [WAI-ARIA 1.1, Characteristics of States and Properties, Value](https://www.w3.org/TR/wai-aria/#propcharacteristic_value) -- [Uniform Resource Identifier (URI): Generic Syntax (RFC 3986)](https://www.ietf.org/rfc/rfc3986.txt) ## Test Cases @@ -61,87 +57,24 @@ _There are no major accessibility support issues known for this rule._ #### Passed example 1 -`aria-required` property with valid true/false value +`aria-controls`that is required property for role `combobox` has multiple `id` references to elements that exist in the same document tree. - ```html -
-``` - -#### Passed example 2 - -`aria-expanded` state with valid true/false/undefined value - ```html -
-``` -#### Passed example 3 - -`aria-pressed` state with valid tristate value - -```html -
``` -#### Passed example 4 - -`aria-errormessage` property with valid ID reference value - -```html -
-``` +#### Passed example 2 -#### Passed example 5 - -`aria-owns` property with valid ID reference list value - -```html -
-``` +`aria-controls`that is required property for role `combobox` has one `id` reference to an element that exist in the same document tree. -#### Passed example 6 - -`aria-rowindex` property with valid integer value - -```html -
Fred
-``` -#### Passed example 7 - -`aria-valuemin`, `aria-valuemax` and `aria-valuenow` properties with valid number values - ```html -
-``` -#### Passed example 8 - -`aria-placeholder` property with valid string value - -```html -
MM-DD-YYYY
``` -#### Passed example 9 - -`aria-orientation` property with valid token value (property inappropriate for the role) - -```html -
-``` - -#### Passed example 10 - -`aria-dropeffect` property with valid token list value - -```html -
-``` - -#### Passed example 11 +#### Passed example 3 -`aria-controls`, which is a required property for the role `scrollbar`, has `ID Reference list` that references at least one element existing in the same document tree. +`aria-controls`that is required property for role `scrollbar` has one valid `id` reference to an element that exist in the same document tree. ```html
Lorem ipsum...
@@ -150,81 +83,27 @@ _There are no major accessibility support issues known for this rule._ ### Failed -#### Failed example 1 - -`aria-required` property with invalid true/false value - -```html -
-``` - -#### Failed example 2 - -`aria-expanded` state with invalid true/false/undefined value - -```html -
-``` - -#### Failed example 3 -`aria-pressed` state with invalid tristate value - -```html -
-``` - -#### Failed example 4 +#### Failed example 1 -`aria-errormessage` property with invalid ID reference value, since space is not allowed in a single ID +`aria-controls`that is required property for role `combobox` does not have any `id` references. ```html -
-``` -#### Failed example 5 - -`aria-rowindex` property with invalid integer value - -```html -
Fred
``` -#### Failed example 6 - -`aria-valuemin`, `aria-valuemax` and `aria-valuenow` property with invalid number values - -```html -
-``` +#### Failed example 2 -#### Failed example 7 +`aria-controls`that is required property for role `combobox` does not have at least one `id` reference to an element that exist in the same document tree. -`aria-live` property with invalid token value ```html -
-``` - -#### Failed example 8 -Element with invalid token list value - -```html -
-``` - -#### Failed example 9 - -`aria-expanded` state with invalid true/false/undefined value for custom element - -```html - ``` -#### Failed example 10 +#### Failed example 3 -`aria-controls`, which is a required property for the role `scrollbar`, references an element that does not exist in the same document tree. +`aria-controls`that is required property for role `scrollbar` does not have at least one `id` reference to an element that exist in the same document tree. ```html
@@ -234,40 +113,29 @@ Element with invalid token list value #### Inapplicable example 1 -Element does not have any ARIA states or properties +Element does not have `aria-controls` as a required property. ```html -
Some Content
+ ``` #### Inapplicable example 2 -Element has ARIA role, but no ARIA states or properties +The element is not an HTML or SVG element. -```html -
Some Content
+ ```html + ``` #### Inapplicable example 3 -`aria-checked` state with empty value +The element is not included in the accessibility tree, nor is it focusable. ```html -
+ ``` #### Inapplicable example 4 -`aria-labelledby` property with empty value - -```html -
-``` - -#### Inapplicable example 5 - -`aria-hidden` state on an element that is not an HTML or SVG element +The `aria-controls` has a value that is the empty string (""). - ```html - -``` From 881dca8d40e9d15bca1e5f5edb1d69e420158530 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 27 Mar 2019 10:07:51 +0100 Subject: [PATCH 09/12] Finish up test cases --- ...-aria-state-or-property-has-valid-value.md | 59 ++++++++----------- 1 file changed, 23 insertions(+), 36 deletions(-) diff --git a/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md b/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md index ce0c5314ed1..ff6df8b7ff3 100644 --- a/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md +++ b/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md @@ -1,9 +1,9 @@ --- -name: Required aria-conrols has valid value +name: aria-controls for scrollbar references existing element rule_type: atomic description: | - This rule checks that each required `aria-controls` property has a valid value. + This rule checks that each `aria-controls` property on an element with the role `scrollbar` references at least one existing element. success_criterion: - 1.3.1 # Info and Relationships @@ -21,11 +21,12 @@ authors: ### Applicability -Any [WAI-ARIA required](https://www.w3.org/TR/wai-aria-1.1/#requiredState) `aria-controls` property that -- is specified on an HTML or SVG element -- is specified on an element that is [included in the accessibility tree](#included-in-the-accessibility-tree) or is [focusable](#focusable), +Any `aria-controls` property that +- is specified on an HTML or SVG element that has the role of `scrollbar` and is [included in the accessibility tree](#included-in-the-accessibility-tree) or is [focusable](#focusable), - has a value that is not the empty string (""). +**Note:** `aria-controls` is a [WAI-ARIA required property](https://www.w3.org/TR/wai-aria-1.1/#requiredState) for the role `scrollbar`. + ### Expectation 1 Each test target has a value that is a list of one or more `id` references. @@ -34,7 +35,7 @@ Each test target has a value that is a list of one or more `id` references. ### Expectation 2 -At least one of `id`s referenced by the test target is specified on an HTML or SVG element that 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. +At least one of the `id`s referenced by the test target is specified on an HTML or SVG element that 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. ## Assumptions @@ -47,7 +48,6 @@ _There are no major accessibility support issues known for this rule._ ## Background - [Understanding Success Criterion 1.3.1: Info and Relationships](https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships.html) -- [ARIA5: Using WAI-ARIA state and property attributes to expose the state of a user interface component](https://www.w3.org/TR/2016/NOTE-WCAG20-TECHS-20161007/ARIA5) - [WAI-ARIA 1.1, Definitions of States and Properties](https://www.w3.org/TR/wai-aria-1.1/#state_prop_def) - [WAI-ARIA 1.1, Characteristics of States and Properties, Value](https://www.w3.org/TR/wai-aria/#propcharacteristic_value) @@ -57,24 +57,26 @@ _There are no major accessibility support issues known for this rule._ #### Passed example 1 -`aria-controls`that is required property for role `combobox` has multiple `id` references to elements that exist in the same document tree. +`aria-controls` on the element with role `scrollbar` has `id` references to multiple elements that exist in the same document tree. ```html - +
Lorem ipsum...
+
Lorem ipsum...
+
``` #### Passed example 2 -`aria-controls`that is required property for role `combobox` has one `id` reference to an element that exist in the same document tree. - +`aria-controls` on the element with role `scrollbar` has one valid `id` reference to an element that exist in the same document tree. ```html - +
Lorem ipsum...
+
``` #### Passed example 3 -`aria-controls`that is required property for role `scrollbar` has one valid `id` reference to an element that exist in the same document tree. +`aria-controls` on the element with role `scrollbar` has multiple `id` references, whereof one is to an element that exist in the same document tree. ```html
Lorem ipsum...
@@ -83,27 +85,17 @@ _There are no major accessibility support issues known for this rule._ ### Failed - #### Failed example 1 -`aria-controls`that is required property for role `combobox` does not have any `id` references. +`aria-controls` on the element with role `scrollbar` does not have any `id` references. ```html - +
``` #### Failed example 2 -`aria-controls`that is required property for role `combobox` does not have at least one `id` reference to an element that exist in the same document tree. - - -```html - -``` - -#### Failed example 3 - -`aria-controls`that is required property for role `scrollbar` does not have at least one `id` reference to an element that exist in the same document tree. +`aria-controls` on the element with role `scrollbar` does not have at least one `id` reference to an element that exist in the same document tree. ```html
@@ -113,21 +105,13 @@ _There are no major accessibility support issues known for this rule._ #### Inapplicable example 1 -Element does not have `aria-controls` as a required property. - -```html - -``` - -#### Inapplicable example 2 - The element is not an HTML or SVG element. ```html ``` -#### Inapplicable example 3 +#### Inapplicable example 2 The element is not included in the accessibility tree, nor is it focusable. @@ -135,7 +119,10 @@ The element is not included in the accessibility tree, nor is it focusable. ``` -#### Inapplicable example 4 +#### Inapplicable example 3 The `aria-controls` has a value that is the empty string (""). +```html +
+``` From 3f72b8dd5215a60a0bbbd02d2a6de797b72555e4 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 27 Mar 2019 10:14:45 +0100 Subject: [PATCH 10/12] Update and rename SC-1-3-1-required-aria-state-or-property-has-valid-value.md to SC-1-3-1-aria-controls-for-scrollbar-has-valid-value.md --- ... => SC-1-3-1-aria-controls-for-scrollbar-has-valid-value.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename _rules/{SC-1-3-1-required-aria-state-or-property-has-valid-value.md => SC-1-3-1-aria-controls-for-scrollbar-has-valid-value.md} (98%) diff --git a/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md b/_rules/SC-1-3-1-aria-controls-for-scrollbar-has-valid-value.md similarity index 98% rename from _rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md rename to _rules/SC-1-3-1-aria-controls-for-scrollbar-has-valid-value.md index ff6df8b7ff3..a6fa466f917 100644 --- a/_rules/SC-1-3-1-required-aria-state-or-property-has-valid-value.md +++ b/_rules/SC-1-3-1-aria-controls-for-scrollbar-has-valid-value.md @@ -1,5 +1,5 @@ --- -name: aria-controls for scrollbar references existing element +name: aria-controls for scrollbar has valid value rule_type: atomic description: | From fdb60b4a46ef43025a1d11027c96f6cecf18ae4a Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Thu, 28 Mar 2019 08:37:48 +0100 Subject: [PATCH 11/12] Update and rename SC-1-3-1-aria-controls-for-scrollbar-has-valid-value.md to SC-1-3-1-aria-controls-for-scrollbar-references-existing-element.md --- ...-aria-controls-for-scrollbar-references-existing-element.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename _rules/{SC-1-3-1-aria-controls-for-scrollbar-has-valid-value.md => SC-1-3-1-aria-controls-for-scrollbar-references-existing-element.md} (98%) diff --git a/_rules/SC-1-3-1-aria-controls-for-scrollbar-has-valid-value.md b/_rules/SC-1-3-1-aria-controls-for-scrollbar-references-existing-element.md similarity index 98% rename from _rules/SC-1-3-1-aria-controls-for-scrollbar-has-valid-value.md rename to _rules/SC-1-3-1-aria-controls-for-scrollbar-references-existing-element.md index a6fa466f917..ff6df8b7ff3 100644 --- a/_rules/SC-1-3-1-aria-controls-for-scrollbar-has-valid-value.md +++ b/_rules/SC-1-3-1-aria-controls-for-scrollbar-references-existing-element.md @@ -1,5 +1,5 @@ --- -name: aria-controls for scrollbar has valid value +name: aria-controls for scrollbar references existing element rule_type: atomic description: | From 7264ed152bdaa1ca73d471f5cf346f3f2a047a7c Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Fri, 29 Mar 2019 09:43:18 +0100 Subject: [PATCH 12/12] Create SC4-1-2-aria-state-or-property-has-valid-value.md --- ...-aria-state-or-property-has-valid-value.md | 272 ++++++++++++++++++ 1 file changed, 272 insertions(+) create mode 100644 _rules/SC4-1-2-aria-state-or-property-has-valid-value.md diff --git a/_rules/SC4-1-2-aria-state-or-property-has-valid-value.md b/_rules/SC4-1-2-aria-state-or-property-has-valid-value.md new file mode 100644 index 00000000000..24db4274c53 --- /dev/null +++ b/_rules/SC4-1-2-aria-state-or-property-has-valid-value.md @@ -0,0 +1,272 @@ +--- +name: ARIA state or property has valid value +rule_type: atomic + +description: | + This rule checks that each ARIA state or property has a valid value + +success_criterion: +- 4.1.2 # Name, Role, Value + +test_aspects: +- DOM Tree +- CSS Styling + +authors: +- Wilco Fiers +- Anne Thyme Nørregaard +--- + +## Test procedure + +### 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. + +### Expectation 1 + +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 type `URI` the value matches the [generic URI syntax](https://www.ietf.org/rfc/rfc3986.txt). + +**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. + +## 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. + +## Accessibility Support + +_There are no major accessibility support issues known for this rule._ + +## Background + +- [Understanding Success Criterion 4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html) +- [ARIA5: Using WAI-ARIA state and property attributes to expose the state of a user interface component](https://www.w3.org/TR/2016/NOTE-WCAG20-TECHS-20161007/ARIA5) +- [WAI-ARIA 1.1, Definitions of States and Properties](https://www.w3.org/TR/wai-aria-1.1/#state_prop_def) +- [WAI-ARIA 1.1, Characteristics of States and Properties, Value](https://www.w3.org/TR/wai-aria/#propcharacteristic_value) +- [Uniform Resource Identifier (URI): Generic Syntax (RFC 3986)](https://www.ietf.org/rfc/rfc3986.txt) + +## Test Cases + +### Passed + +#### Passed example 1 + +`aria-required` property with valid true/false value + + ```html +
+``` + +#### Passed example 2 + +`aria-expanded` state with valid true/false/undefined value + +```html +
+``` + +#### Passed example 3 + +`aria-pressed` state with valid tristate value + +```html +
+``` + +#### Passed example 4 + +`aria-errormessage` property with valid ID reference value + +```html +
+``` + +#### Passed example 5 + +`aria-owns` property with valid ID reference list value + +```html +
+``` + +#### Passed example 6 + +`aria-rowindex` property with valid integer value + +```html +
Fred
+``` + +#### Passed example 7 + +`aria-valuemin`, `aria-valuemax` and `aria-valuenow` properties with valid number values + +```html +
+``` + +#### Passed example 8 + +`aria-placeholder` property with valid string value + +```html +
MM-DD-YYYY
+``` + +#### Passed example 9 + +`aria-orientation` property with valid token value (property inappropriate for the role) + +```html +
+``` + +#### Passed example 10 + +`aria-dropeffect` property with valid token list value + +```html +
+``` + +#### Passed example 11 + +`aria-controls`, which is a required property for the role `scrollbar`, has `ID Reference list` that references at least one element existing in the same document tree. + +```html +
Lorem ipsum...
+
+``` + +### Failed + +#### Failed example 1 + +`aria-required` property with invalid true/false value + +```html +
+``` + +#### Failed example 2 + +`aria-expanded` state with invalid true/false/undefined value + +```html +
+``` + +#### Failed example 3 + +`aria-pressed` state with invalid tristate value + +```html +
+``` + +#### Failed example 4 + +`aria-errormessage` property with invalid ID reference value, since space is not allowed in a single ID + +```html +
+``` + +#### Failed example 5 + +`aria-rowindex` property with invalid integer value + +```html +
Fred
+``` + +#### Failed example 6 + +`aria-valuemin`, `aria-valuemax` and `aria-valuenow` property with invalid number values + +```html +
+``` + +#### Failed example 7 + +`aria-live` property with invalid token value + +```html +
+``` + +#### Failed example 8 + +Element with invalid token list value + +```html +
+``` + +#### Failed example 9 + +`aria-expanded` state with invalid true/false/undefined value for custom element + +```html + +``` + +#### Failed example 10 + +`aria-controls`, which is a required property for the role `scrollbar`, references an element that does not exist in the same document tree. + +```html +
+``` + +### Inapplicable + +#### Inapplicable example 1 + +Element does not have any ARIA states or properties + +```html +
Some Content
+``` + +#### Inapplicable example 2 + +Element has ARIA role, but no ARIA states or properties + +```html +
Some Content
+``` + +#### Inapplicable example 3 + +`aria-checked` state with empty value + +```html +
+``` + +#### Inapplicable example 4 + +`aria-labelledby` property with empty value + +```html +
+``` + +#### Inapplicable example 5 + +`aria-hidden` state on an element that is not an HTML or SVG element + + ```html + +```