From 7adb9ad15e0c8d9137f06b3a86c0daee2b85f6a2 Mon Sep 17 00:00:00 2001
From: WilcoFiers
Date: Mon, 23 Oct 2023 16:52:58 +0000
Subject: [PATCH] "Video element auditory content has captions" [f51b46]:
Adding 1.2.1 as a secondary requirement. (#2089)
* Adding 1.2.1 as a secondary requirement.
* Modifying secondary requirement text to be the standard format.
---
content-assets/wcag-act-rules/testcases.json | 24 ++
content/rules/78fd32/proposed.md | 245 ++++++++-----------
content/rules/9e45ec/proposed.md | 4 +-
content/rules/f51b46/proposed.md | 14 +-
wcag-mapping.json | 4 +-
5 files changed, 138 insertions(+), 153 deletions(-)
diff --git a/content-assets/wcag-act-rules/testcases.json b/content-assets/wcag-act-rules/testcases.json
index 9760b6cd..2f70116c 100644
--- a/content-assets/wcag-act-rules/testcases.json
+++ b/content-assets/wcag-act-rules/testcases.json
@@ -24948,6 +24948,9 @@
"failed": "not satisfied",
"passed": "further testing needed",
"inapplicable": "further testing needed"
+ },
+ "wcag20:1.2.1": {
+ "secondary": "This success criterion is **less strict** than this rule. This is because the rule does not consider that the video may be a media alternative for text. Some of the failed examples satisfy this success criterion."
}
},
"expected": "passed",
@@ -24978,6 +24981,9 @@
"failed": "not satisfied",
"passed": "further testing needed",
"inapplicable": "further testing needed"
+ },
+ "wcag20:1.2.1": {
+ "secondary": "This success criterion is **less strict** than this rule. This is because the rule does not consider that the video may be a media alternative for text. Some of the failed examples satisfy this success criterion."
}
},
"expected": "passed",
@@ -25008,6 +25014,9 @@
"failed": "not satisfied",
"passed": "further testing needed",
"inapplicable": "further testing needed"
+ },
+ "wcag20:1.2.1": {
+ "secondary": "This success criterion is **less strict** than this rule. This is because the rule does not consider that the video may be a media alternative for text. Some of the failed examples satisfy this success criterion."
}
},
"expected": "failed",
@@ -25038,6 +25047,9 @@
"failed": "not satisfied",
"passed": "further testing needed",
"inapplicable": "further testing needed"
+ },
+ "wcag20:1.2.1": {
+ "secondary": "This success criterion is **less strict** than this rule. This is because the rule does not consider that the video may be a media alternative for text. Some of the failed examples satisfy this success criterion."
}
},
"expected": "failed",
@@ -25068,6 +25080,9 @@
"failed": "not satisfied",
"passed": "further testing needed",
"inapplicable": "further testing needed"
+ },
+ "wcag20:1.2.1": {
+ "secondary": "This success criterion is **less strict** than this rule. This is because the rule does not consider that the video may be a media alternative for text. Some of the failed examples satisfy this success criterion."
}
},
"expected": "failed",
@@ -25098,6 +25113,9 @@
"failed": "not satisfied",
"passed": "further testing needed",
"inapplicable": "further testing needed"
+ },
+ "wcag20:1.2.1": {
+ "secondary": "This success criterion is **less strict** than this rule. This is because the rule does not consider that the video may be a media alternative for text. Some of the failed examples satisfy this success criterion."
}
},
"expected": "failed",
@@ -25128,6 +25146,9 @@
"failed": "not satisfied",
"passed": "further testing needed",
"inapplicable": "further testing needed"
+ },
+ "wcag20:1.2.1": {
+ "secondary": "This success criterion is **less strict** than this rule. This is because the rule does not consider that the video may be a media alternative for text. Some of the failed examples satisfy this success criterion."
}
},
"expected": "inapplicable",
@@ -25158,6 +25179,9 @@
"failed": "not satisfied",
"passed": "further testing needed",
"inapplicable": "further testing needed"
+ },
+ "wcag20:1.2.1": {
+ "secondary": "This success criterion is **less strict** than this rule. This is because the rule does not consider that the video may be a media alternative for text. Some of the failed examples satisfy this success criterion."
}
},
"expected": "inapplicable",
diff --git a/content/rules/78fd32/proposed.md b/content/rules/78fd32/proposed.md
index 7d998c50..a0691dde 100644
--- a/content/rules/78fd32/proposed.md
+++ b/content/rules/78fd32/proposed.md
@@ -1,5 +1,5 @@
---
-title: "Important line height in style attributes is wide enough"
+title: "Line height in style attributes is not !important"
permalink: /standards-guidelines/act/rules/78fd32/proposed/
ref: /standards-guidelines/act/rules/78fd32/proposed/
lang: en
@@ -9,18 +9,21 @@ github:
feedbackmail: public-wcag-act@w3.org
footer: |
Rule Identifier: 78fd32
- Date: Updated 16 October 2023
- Authors: Jean-Yves Moyen. Previous Authors: Jey Nandakumar. Contributors: Participants of the ACT Rules Community Group (CG).
+ Date: Updated 23 October 2023
+ Authors: Jean-Yves Moyen, Jey Nandakumar. Contributors: Participants of the ACT Rules Community Group (CG).
This rule was written in the ACT Rules Community Group. It is written as part of the EU-funded WAI-Tools Project. Implementations are part of the EU funded WAI-CooP Project. It will be reviewed by the Accessibility Guidelines Working Group (AG WG).
proposed: true
+deprecated: |
+ This rule has been deprecated and superseded by Rule [Important letter spacing in style attributes is wide enough](https://act-rules.github.io/rules/fsy8c7). This rule is not maintained anymore and should not be used.
+
rule_meta:
id: 78fd32
- name: "Important line height in style attributes is wide enough"
+ name: "DEPRECATED - Line height in style attributes is not !important"
rule_type: atomic
- original_file: important-line-height-wide-enough-78fd32.md
+ original_file: line-height-not-important-78fd32.md
description: |
This rule checks that the `style` attribute is not used to prevent adjusting `line-height` by using `!important`, except if it's at least 1.5 times the font size.
- last_modified: 16 October 2023
+ last_modified: 23 October 2023
scs_tested:
- handle: Text Spacing
num: 1.4.12
@@ -29,36 +32,35 @@ rule_meta:
## Applicability
-This rule applies to any [HTML element][] with one or more [visible][] [text node][] children, when the text inside the elements includes a [soft wrap break][] and all the following are true for the `line-height` property of the element:
-
-- the [specified][] value is [declared][] in a `style` attribute; and
-- the [computed][] value is [important][].
+This rule applies to any HTML element with [visible][] text that includes a [soft wrap break](https://www.w3.org/TR/css-text-3/#soft-wrap-break) and for which the `style` attribute [declares][declared] the [line-height][] CSS property.
## Expectation
-For each test target, the [used][] value of its `line-height` property is at least 1.5 times the [computed][] value of its `font-size` property.
+For each test target, at least one of the following is true:
+
+- **not important**: the [computed][] value of its [line-height][] property is not [important][]; or
+- **large enough**: the [used][] value of its [line-height][] property is at least 1.5 times the [computed][] value of its [font-size][] property; or
+- **cascade**: the [cascaded][] value of its [line-height][] property is not a value [declared][] in its `style` attribute.
## Assumptions
-- There is no mechanism available on the page to adjust `line-height`. If there is such a mechanism, it is possible to fail this rule while [Success Criterion 1.4.12 Text Spacing][sc1412] is still satisfied.
+- There is no mechanism available on the page to adjust [line-height][]. If there is such a mechanism, it is possible to fail this rule while [Success Criterion 1.4.12 Text Spacing][sc1412] is still satisfied.
- The font size is constant for all text in the element. If font-size changes (e.g., through use of the `::first-line` pseudo-element) then the required line height would also change throughout the element. This is untested by the current rule.
- No other style attributes are used to increase or decrease the distance between lines of text. For example, style attributes such as `position`, `padding`, and `margin` could be used to increase the distance between lines of text to meet [Success Criterion 1.4.12 Text Spacing][sc1412]. Oppositely, those style attributes could also be used to reduce the distance between lines of text. Thus, it is possible to pass this rule, but still fail [Success Criterion 1.4.12 Text Spacing][sc1412] due to other styling choices.
-- The text in the element express something in a human language written in a script that uses the `line-height` property.
-
## Accessibility Support
While some assistive technologies are able to set [user origin][] or [user agent origin][] styles, others, such as browser extensions, are only able to set styles with the [author origin][]. Such assistive technologies cannot create styles "winning" the [cascade sort][] over a `style` attribute with an [important][] declaration.
## Background
-Styles [declared][] in a `style` attribute have higher [cascade specificity][] than any selector; therefore, they "win" the [cascade sort] over any other style from [author origin][], i.e. it cannot be overridden by any of these. On the other hand, if such a style is [declared][] in a style sheet, it can still "lose" the [cascade sort][] to declarations with higher [specificity][] or simply coming from a later style sheet (such as ones injected by assistive technologies). This rule ensures that the element is not in the first case and that the style can be overridden by users, unless it is already at least the minimum required threshold. [Important][] styles that are declared with the [user][user origin] or [user agent][user agent origin] can win the [cascade sort][] over styles with the [author origin][].
+When a style is [declared][] in the `style` attribute with an [important][] declaration, it "wins" the [cascade sort] over any other style from [author origin][], i.e. it cannot be overridden by any of these. On the other hand, if such a style is [declared][] in a style sheet, it can still "lose" the [cascade sort][] to declarations with higher [specificity][] or simply coming from a later style sheet (such as ones injected by assistive technologies). This rule ensures that the element is not in the first case and that the style can be overridden by users, unless it is already at least the minimum recommended threshold. [Important][] styles that are declared with the [user][user origin] or [user agent][user agent origin] origin can win the [cascade sort][] over styles with the [author origin][].
-CSS specifications define each declaration as being either [important][] (if it has the `!important` annotation) or [normal][]. Given that `normal` is also a keyword for some properties, and that `!important` is wider known than this distinction, this rule rather uses "[important][]"/"not [important][]" to avoid confusion.
+CSS specifications define each declaration as being either [important][] (such as the `!important` annotation) or [normal][]. Given that `normal` is also a keyword for this property, and that `!important` is more widely known, this rule rather uses "[important][]"/"not [important][]" to avoid confusion.
-This rule evaluates the [used][] value of the `line-height` property instead of its [computed][] value because the [used][] value is guaranteed to use absolute units (i.e., pixels). This streamlines comparison with the [computed][] `font-size` which is also absolute. The [computed][] `line-height` may be a unitless number that is harder to compare.
+This rule evaluates the [used][] value of the [line-height][] property instead of its [computed][] value because the [used][] value is guaranteed to use absolute units (i.e., pixels). This streamlines comparison with the [computed][] [font-size][] which is also absolute. The [computed][] [line-height][] may be a unitless number that is harder to compare.
### Bibliography
@@ -66,10 +68,6 @@ This rule evaluates the [used][] value of the `line-height` property instead of
- [CSS Text Module Level 3 - Spacing](https://www.w3.org/TR/css-text-3/#spacing)
- [CSS Visual formatting model details](https://drafts.csswg.org/css2/visudet.html)
-### About test cases
-
-Test cases descriptions abusively refer to the CSS properties of text nodes, meaning the one of their parent.
-
## Accessibility Requirements Mapping
@@ -100,21 +98,33 @@ The following aspects are required in using this rule.
#### Passed Example 1
-Open in a new tab
+Open in a new tab
-This `p` element has a [used][] `line-height` of twice the font size.
+This `p` element has a **not [important][]** [computed][] `line-height`.
```html
-
+
The toy brought back fond memories of being lost in the rain forest.
```
#### Passed Example 2
-Open in a new tab
+Open in a new tab
+
+This `p` element has a [used][] `line-height` of twice the font size, which is **large enough**.
+
+```html
+
+ The toy brought back fond memories of being lost in the rain forest.
+
+```
+
+#### Passed Example 3
+
+Open in a new tab
-This `p` element has a [used][] `line-height` of `30px`, which is exactly 1.5 times the `font-size` of `20px`.
+This `p` element has a [used][] `line-height` of `30px`, which is **large enough** (the threshold is `30px`).
```html
-Open in a new tab
+
+ The toy brought back fond memories of being lost in the rain forest.
+
+```
+
+#### Passed Example 9
+
+Open in a new tab
-This `p` element has a [computed][] `line-height` of `15px`, 1.5 times its [computed][] `font-size` of `10px`; the `div` element has no [visible][] text node children.
+The [computed][] value of the `line-height` property of this `p` element is **not [important][]**. The [computed][] value of the `line-height` property of this `span` element is the [inherited][] value, that is the [computed][] value of its parent and therefore also **not [important][]**.
```html
-
-
+
+
The toy brought back fond memories of being lost in the rain forest.
-
-
+
+
```
-#### Passed Example 8
+#### Passed Example 10
-Open in a new tab
+Open in a new tab
-This `p` element has a [computed][] `line-height` of 1.5 times its `font-size`; the `div` element has no [visible][] text node children.
+The [computed][] value of the `line-height` property of this `p` element is **not [important][]**. The [computed][] value of the `line-height` property of this `span` element is the [inherited][] value, that is the [computed][] value of its parent and therefore also **not [important][]**.
```html
-
-
+
+
The toy brought back fond memories of being lost in the rain forest.
-
-
+
+
```
### Failed
@@ -228,7 +256,7 @@ This `p` element has a [used][] `line-height` equal to the font size, which is b
Open in a new tab
-This `p` element node has a [used][] `line-height` of `20px`, which is below the required minimum given the specified font size is 20 pixels.
+This `p` element has a [used][] `line-height` of `20px`, which is below the required minimum given the specified font size is 20 pixels.
```html
-
-
- The toy brought back fond memories of being lost in the rain forest.
-
-```
-
-#### Inapplicable Example 8
-
-Open in a new tab
-
-This `p` element does not have an [important][] [computed][] `line-height`.
-
-```html
-
- The toy brought back fond memories of being lost in the rain forest.
-
-```
-
-#### Inapplicable Example 9
-
-Open in a new tab
-
-The [computed][] value of the `line-height` property of this `span` element is the [inherited][] value, that is the [computed][] value of the `p` element and therefore not [important][]; the `p` element has no [visible][] text node children.
-
-```html
-
-
- The toy brought back fond memories of being lost in the rain forest.
-
-
-```
-
-#### Inapplicable Example 10
-
-Open in a new tab
-
-The [computed][] value of the `line-height` property of this `span` element is the [inherited][] value, that is the [computed][] value of the `p` element and therefore not [important][]; the `p` element has no [visible][] text node children.
-
-```html
-
-
- The toy brought back fond memories of being lost in the rain forest.
-
-
-```
-
## Glossary
-### Namespaced Element {#namespaced-element}
-
-An [element][] with a specific [namespaceURI][] value from [HTML namespaces][]. For example an "SVG element" is any element with the "SVG namespace", which is `http://www.w3.org/2000/svg`.
-
-Namespaced elements are not limited to elements described in a specification. They also include custom elements. Elements such as `a` and `title` have a different namespace depending on where they are used. For example a `title` in an HTML page usually has the HTML namespace. When used in an `svg` element, a `title` element has the SVG namespace instead.
-
### Outcome {#outcome}
An _outcome_ is a conclusion that comes from evaluating an ACT Rule on a [test subject](https://www.w3.org/TR/act-rules-format/#test-subject) or one of its constituent [test target](https://www.w3.org/TR/act-rules-format/#test-target). An outcome can be one of the three following types:
@@ -460,21 +414,16 @@ For more details, see [examples of visible](https://act-rules.github.io/pages/ex
[author origin]: https://www.w3.org/TR/css-cascade-4/#cascade-origin-author 'CSS Cascading and Inheritance Level 4 (Working draft) - Cascading Origins - Author Origin'
[cascade sort]: https://www.w3.org/TR/css-cascade-4/#cascade-sort 'CSS Cascading and Inheritance Level 4 (Working draft) - Cascade Sort'
-[cascade specificity]: https://www.w3.org/TR/css-cascade-3/#cascade-specificity 'CSS Cascading and Inheritance Level 4 (Candidate Recommendation) - Cascade specificity'
+[cascaded]: https://www.w3.org/TR/css-cascade-4/#cascaded 'CSS Cascading and Inheritance Level 4 (Working draft) - Cascaded Values'
[computed]: https://www.w3.org/TR/css-cascade-4/#computed 'CSS Cascading and Inheritance Level 4 (Working draft) - Computed Values'
[declared]: https://www.w3.org/TR/css-cascade-4/#declared 'CSS Cascading and Inheritance Level 4 (Working draft) - Declared Values'
-[element]: https://dom.spec.whatwg.org/#element 'DOM element, 2021/05/31'
-[html element]: #namespaced-element
-[html namespaces]: https://infra.spec.whatwg.org/#namespaces 'HTML namespace, 2021/05/31'
+[font-size]: https://www.w3.org/TR/css-fonts-4/#propdef-font-size 'CSS Fonts Module Level 4 (Working draft) - Font size: the font-size property'
[important]: https://www.w3.org/TR/css-cascade-4/#importance 'CSS Cascading and Inheritance Level 4 (Working draft) - Importance'
[inherited]: https://www.w3.org/TR/css-cascade-4/#inheriting 'CSS Cascading and Inheritance Level 4 (Working draft) - Inherited Values'
-[namespaceuri]: https://dom.spec.whatwg.org/#dom-element-namespaceuri 'DOM Element namespaceURI, 2021/05/31'
+[line-height]: https://drafts.csswg.org/css2/visudet.html#propdef-line-height 'CSS Visual formatting model details - line-height property'
[normal]: https://www.w3.org/TR/css-cascade-4/#normal 'CSS Cascading and Inheritance Level 4 (Working draft) - Normal declarations'
[sc1412]: https://www.w3.org/TR/WCAG21/#text-spacing 'Success Criterion 1.4.12 Text Spacing'
-[soft wrap break]: https://www.w3.org/TR/css-text-3/#soft-wrap-break
[specificity]: https://www.w3.org/TR/selectors/#specificity 'CSS Selectors Level 4 (Working draft) - Specificity'
-[specified]: https://www.w3.org/TR/css-cascade-4/#specified 'CSS Cascading and Inheritance Level 4 (Working draft) - Specified Values'
-[text node]: https://dom.spec.whatwg.org/#text
[used]: https://www.w3.org/TR/css-cascade-4/#used 'CSS Cascading and Inheritance Level 4 (Working draft) - Used Values'
[user agent origin]: https://www.w3.org/TR/css-cascade-4/#cascade-origin-ua 'CSS Cascading and Inheritance Level 4 (Working draft) - Cascading Origins - User Agent Origin'
[user origin]: https://www.w3.org/TR/css-cascade-4/#cascade-origin-user 'CSS Cascading and Inheritance Level 4 (Working draft) - Cascading Origins - User Origin'
diff --git a/content/rules/9e45ec/proposed.md b/content/rules/9e45ec/proposed.md
index b827f5d9..0d86ccdf 100644
--- a/content/rules/9e45ec/proposed.md
+++ b/content/rules/9e45ec/proposed.md
@@ -9,7 +9,7 @@ github:
feedbackmail: public-wcag-act@w3.org
footer: |
Rule Identifier: 9e45ec
- Date: Updated 16 October 2023
+ Date: Updated 23 October 2023
Authors: Jean-Yves Moyen, Jey Nandakumar. Contributors: Participants of the ACT Rules Community Group (CG).
This rule was written in the ACT Rules Community Group. It is written as part of the EU-funded WAI-Tools Project. Implementations are part of the EU funded WAI-CooP Project. It will be reviewed by the Accessibility Guidelines Working Group (AG WG).
proposed: true
@@ -23,7 +23,7 @@ rule_meta:
original_file: word-spacing-not-important-9e45ec.md
description: |
This rule checks that the `style` attribute is not used to prevent adjusting `word-spacing` by using `!important`, except if it's at least `0.16` times the font size.
- last_modified: 16 October 2023
+ last_modified: 23 October 2023
scs_tested:
- handle: Text Spacing
num: 1.4.12
diff --git a/content/rules/f51b46/proposed.md b/content/rules/f51b46/proposed.md
index 3c4233d9..79a9857b 100644
--- a/content/rules/f51b46/proposed.md
+++ b/content/rules/f51b46/proposed.md
@@ -9,7 +9,7 @@ github:
feedbackmail: public-wcag-act@w3.org
footer: |
Rule Identifier: f51b46
- Date: Updated 30 August 2023
+ Date: Updated 23 October 2023
Authors: Brian Bors, Wilco Fiers. Contributors: Participants of the ACT Rules Community Group (CG).
This rule was written in the ACT Rules Community Group. It is written as part of the EU-funded WAI-Tools Project. Implementations are part of the EU funded WAI-CooP Project. It will be reviewed by the Accessibility Guidelines Working Group (AG WG).
@@ -22,7 +22,7 @@ rule_meta:
original_file: video-captions-f51b46.md
description: |
This rule checks that captions are available for audio information in non-streaming `video` elements.
- last_modified: 30 August 2023
+ last_modified: 23 October 2023
---
## Applicability
@@ -93,6 +93,16 @@ There are no accessibility support issues known.
+### Secondary Requirements
+
+This rule is related to the following accessibility requirements, but was
+not designed to test this requirements directly. These
+[secondary requirements](https://w3c.github.io/wcag-act/act-rules-format.html#secondary-requirements)
+can either be stricter than the rule requires, or may be satisfied in ways
+not tested by the rule:
+
+- [1.2.1 Audio-only and Video-only (Prerecorded) (Level A)](https://www.w3.org/TR/WCAG21/#audio-only-and-video-only-prerecorded): This success criterion is **less strict** than this rule. This is because the rule does not consider that the video may be a media alternative for text. Some of the failed examples satisfy this success criterion.
+
## Input Aspects
The following aspects are required in using this rule.
diff --git a/wcag-mapping.json b/wcag-mapping.json
index a432f8d5..29e45c1f 100644
--- a/wcag-mapping.json
+++ b/wcag-mapping.json
@@ -903,7 +903,9 @@
{
"title": "Video element auditory content has captions",
"permalink": "/standards-guidelines/act/rules/f51b46/proposed/",
- "successCriteria": [],
+ "successCriteria": [
+ "audio-only-and-video-only-prerecorded"
+ ],
"wcagTechniques": [
"G87",
"G93",