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 +### 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",