diff --git a/_rules/heading-descriptive-b49b2e.md b/_rules/heading-descriptive-b49b2e.md index f469d6bc92..1631a3c8fd 100755 --- a/_rules/heading-descriptive-b49b2e.md +++ b/_rules/heading-descriptive-b49b2e.md @@ -1,10 +1,10 @@ --- id: b49b2e -name: Heading is descriptive +name: Heading is relevant rules_format: 1.1 rule_type: atomic -description: | - This rule checks that headings describe the topic or purpose of the content. +description: + This rule checks that headings are relevant to a specific topic, purpose or page. accessibility_requirements: wcag20:2.4.6: # Headings and labels (AA) forConformance: true @@ -13,11 +13,11 @@ accessibility_requirements: inapplicable: further testing needed input_aspects: - Accessibility Tree - - DOM Tree - CSS Styling - Language acknowledgments: authors: + - Armağan Tekdöner - Carlos Duarte - Dagfinn Rømen - Geir Sindre Fossøy @@ -28,202 +28,38 @@ acknowledgments: ## Applicability -This rule applies to any [semantic][semantic role] `heading` element that is [included in the accessibility tree][] and has a non-empty (`””`) [accessible name][]. +This rule applies to any [semantic](semantic-role "Definition of semantic role") `heading` element that is [included in the accessibility tree](included-in-the-accessibility-tree "Definition of included in the accessibility tree") and has a non-empty `""` [accessible name](accessible-name "Definition of accessible name"). It also applies to other elements that are not semantically `heading` elements, but that are presented as headings. -## Expectation +### Applicability Type Designation -Each target element describes the topic or purpose of the first [perceivable content][] after the test target that is not [decorative][]. The order of elements is determined by the [flat tree][]. +Rule contains subjective applicability, depending on whether the target element should be considered a heading. -**Note:** Headings do not need to be lengthy. A word, or even a single character, may be sufficient. +## Expectations + +Each heading is relevant to the specific page or section where it appears and it is sufficiently intelligible. ## Background -Headings that are visible but not in the accessibility tree are a failure of [Success Criterion 1.3.1 Info and Relationships][sc131]. These are not tested by this rule but they can still fail [Success Criterion 2.4.6 Headings and Labels][sc246]. +Headings are normally marked as semantic headings using `
We are open Monday through Friday from 10 to 16
- -``` - -#### Passed Example 2 - -This heading marked up with an [explicit role][] of `heading` describes the topic of the following paragraph. - -```html - - Opening Hours -We are open Monday through Friday from 10 to 16
- -``` - -#### Passed Example 3 - -This `h1` heading element with an image describes the topic of the following paragraph. - -```html - -We are open Monday through Friday from 10 to 16
- -``` - -#### Passed Example 4 - -This `h1` heading element has a single character text that describes the topic of the following description list. - -```html - -- We are open Monday through Friday from 10 to 16 -
- -``` - -#### Passed Example 6 - -This heading describes the first [perceivable content][] after it (the first `p` element). The next [perceivable content][] (the second `p` element) is not considered by this rule. - -```html - -We are open Monday through Friday from 10 to 16
-We are open Saturday from 10 to 13
- -``` - -### Failed - -#### Failed Example 1 - -This `h1` heading element does not describes the topic of the following paragraph. - -```html - -We are open Monday through Friday from 10 to 16
- -``` - -#### Failed Example 2 - -This heading marked up with an [explicit role][] of `heading` does not describe the topic of the following paragraph. - -```html - - Weather -We are open Monday through Friday from 10 to 16
- -``` - -#### Failed Example 3 - -This heading marked up with an [explicit role][] of `heading` does not describe the topic of the following paragraph. The heading is positioned off screen but is [included in the accessibility tree][]. - -```html - - Weather -- We are open Monday through Friday from 10 to 16 -
- -``` - -#### Failed Example 4 - -This `h1` heading element does not describe the first [perceivable content][] after it (the first `p` element). The next [perceivable content][] (the second `p` element) is not considered by this rule. - -```html - -We are open Monday through Friday from 10 to 16
-It is going to rain tomorrow
- -``` - -### Inapplicable - -#### Inapplicable Example 1 - -There is no heading. - -```html - -We are open Monday through Friday from 10 to 16
- -``` - -#### Inapplicable Example 2 - -This `h1` heading element is not [included in the accessibility tree][]. - -```html - -We are open Monday through Friday from 10 to 16
- -``` - -[decorative]: https://www.w3.org/TR/WCAG22/#dfn-pure-decoration 'WCAG definition of Pure decoration' -[flat tree]: https://drafts.csswg.org/css-scoping/#flat-tree 'Definition of flat tree' -[included in the accessibility tree]: #included-in-the-accessibility-tree 'Definition of included in the accessibility tree' -[presentational roles conflict resolution]: https://www.w3.org/TR/wai-aria-1.2/#conflict_resolution_presentation_none 'Presentational Roles Conflict Resolution' -[sc131]: https://www.w3.org/TR/WCAG22/#info-and-relationships ' Success Criterion 1.3.1 Info and Relationships' -[sc246]: https://www.w3.org/TR/WCAG22/#headings-and-labels 'Success Criterion 2.4.6 Headings and Labels' -[semantic role]: #semantic-role 'Definition of semantic role' -[visible]: #visible 'Definition of visible' -[accessible name]: #accessible-name 'Definition of accessible name' -[perceivable content]: #perceivable-content 'Definition of perceivable content'