Skip to content
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

SC2-4-6-descriptive-headings #70

Closed
geirsf opened this issue Mar 2, 2018 · 7 comments
Closed

SC2-4-6-descriptive-headings #70

geirsf opened this issue Mar 2, 2018 · 7 comments
Assignees
Labels
Rule Use this label for a new rule that does not exist already

Comments

@geirsf
Copy link

geirsf commented Mar 2, 2018


name: Descriptive headings
description: |
This rule checks that headings describe the topic or purpose of the content.

success_criterion:

  • 2.4.6 # Headings and labels

test aspects:

  • DOM Tree

authors:

  • Dagfinn Rømen
  • Geir Sindre Fossøy
  • Carlos Duarte

Test procedure

Applicability

The rule applies to any element with the the semantic role of heading.

Note: The WCAG 2.0 success criterion 2.4.6 applies to all headings.

Note: Heading content defines the header of a section (whether explicitly marked up using sectioning content elements, or implied by the heading content itself).

Expectation

Each target element describes the topic or purpose of the subsequent content.

Note: Headings do not need to be lengthy. A word, or even a single character, may suffice.

Assumptions

  • Heading markup is covered by success criterion 1.3.1 Info and Relationships.

Accessibility Support

There are no major accessibility support issues known for this rule.

Background

Test Cases

Passed

<!-- Heading marked up with h-element that describes the topic or purpose of the following section of content -->
<h1 class="target">Opening Hours</h1>
<p>We are open Monday through Friday from 10 to 16</p>
<!-- Heading marked up with role="heading" that describes the topic or purpose of the following section of content -->
<span role="heading">Opening Hours</span>
<p>We are open Monday through Friday from 10 to 16</p>
<!-- Heading marked up with h-element with an image that describes the topic or purpose of the following section of content -->
<h1 class="target"><img scr="../test-assets/opening_hours_icon.png" alt="Opening hours"></img></h1>
<p>We are open Monday through Friday from 10 to 16</p>
<!-- Heading marked up with h-element that is a single character that describes the topic or purpose of the following section of content -->
<h1 class="target">A</h1>
<dl>  
<dt>airplane</dt>
  <dd>a powered flying vehicle with fixed wings and a weight greater than that of the air it displaces.</dd>
 <dt>apple</dt>
  <dd>the round fruit of a tree of the rose family, which typically has thin green or red skin and crisp flesh.</dd>
</dl>

Failed

<!-- Heading marked up with h-element that does not describe the topic or purpose of the following section of content -->
<h1 class="target">Weather</h1>
<p>We are open Monday through Friday from 10 to 16</p>
<!-- Heading marked up with role="heading" that does not describe the topic or purpose of the following section of content -->
<span role="heading">Weather</span>
<p>We are open Monday through Friday from 10 to 16</p>

Inapplicable

<!-- No heading -->
<p>We are open Monday through Friday from 10 to 16</p>
<!-- Heading that is not visible to users -->
<h1 style="display: none;">Opening hours</h1>
<p>We are open Monday through Friday from 10 to 16</p>
@geirsf geirsf self-assigned this Mar 2, 2018
@DagfinnRomen DagfinnRomen self-assigned this Mar 2, 2018
@WilcoFiers
Copy link
Member

All headings that can be identified by bolder text, the text being italic, or larger font-size.

Are you saying here that every text that has one of these properties should be considered a heading? If so, I'm not sure that's true. It also begs the question, larger / bolder than what?

@DagfinnRomen
Copy link
Collaborator

Agree, we need more specific information on what is considered a heading. We have reused the assumption from an existing draft, https://github.com/auto-wcag/auto-wcag/blob/master/_drafts/SC1-3-1-p-as-heading.md

@EmmaJP
Copy link
Collaborator

EmmaJP commented Mar 8, 2018

This should also include all content marked as a heading element. Possibly also things like table or image captions.

Determining what other text could be considered a heading is a lot less clear cut and can easily include things not intended to be a heading. I suspect that would need a person to determine. Would 1.3.1 cover it?

@carlosapaduarte carlosapaduarte self-assigned this Mar 8, 2018
@MaliinO MaliinO self-assigned this Apr 12, 2018
@geirsf
Copy link
Author

geirsf commented May 31, 2018

Made some changes in the Applicability and Assumptions for the testrule.

@DagfinnRomen
Copy link
Collaborator

Added test cases.

@DagfinnRomen DagfinnRomen changed the title SC2-4-6-descriptive-headings SC2-4-6-descriptive-headings / Updated Jun 6, 2018
@annethyme annethyme added this to Drafts/Final (Changes Requested) in Rules Progress Overview Jun 12, 2018
@annethyme annethyme moved this from Drafts/Final (Changes Requested) to Issues (TODO) in Rules Progress Overview Jun 12, 2018
@ShadowBB
Copy link
Collaborator

After the meeting today we changed the applicability to not test for the definition of headers, we will leave that up to a different rule. (possibly in 1.3.1 or in a rule group with this rule).

We added assumptions that reflect this and also restructured the test cases to reflect this.

We also added an aria and image test case.

@ShadowBB
Copy link
Collaborator

We might need to include "that is [visible on the page][] or [exposed to assistive technologies][]" in the applicability, and if we include that we need to add some additional test cases.

@annethyme annethyme added this to To do in Q3 2018 Status Jul 10, 2018
@annethyme annethyme added the Rule Use this label for a new rule that does not exist already label Sep 10, 2018
@DagfinnRomen DagfinnRomen changed the title SC2-4-6-descriptive-headings / Updated SC2-4-6-descriptive-headings Oct 3, 2018
@geirsf geirsf closed this as completed Oct 3, 2018
annethyme pushed a commit that referenced this issue Oct 31, 2018
Closes issue: #70 

## Guidance for the PR (pull request) creator

**When creating PR:**
- [x] Make sure you requesting to **pull a issue/feature/bugfix branch** (right side) to the master branch (left side).

**After creating PR:**
- [x] Add yourself (and co-authors) as "Assignees" for PR
- [x] Add label to indicate if it's a `Rule`, `Definition` or `Chore` (more to the administrative side)
- [x] Add relevant project (e.g. "Q3 2018 Status") to PR
- [x] OPTIONAL: If you want anyone in particular to review your pull request, assign them as "Reviewers".
- [x] Close the issue that the PR resolves (and make sure the issue is referenced in the top of this comment)

# How to Review And Approve
- Go to the “Files changed” tab
- Here you will have the option to leave comments on different lines. 
- Once the review is completed, find the “Review changes” button in the top right, select “Approve” (if you are really confident in the rule) or "Request changes" and click “Submit review”.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rule Use this label for a new rule that does not exist already
Projects
No open projects
Development

No branches or pull requests

8 participants