-
Notifications
You must be signed in to change notification settings - Fork 78
[WIP] Rule update: Heading is descriptive (b49b2e) #444
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Anne,
I am unsure why we should evaluate both the Accessible name and the Text Nodes. If they are different, should not only the Accessible name be evaluated (seeing as it replaces the text nodes?)
I have misplaced my test asset, "oranges.png". I don't know how to get it into a folder... Can @JKODU help? |
@ShadowBB, |
### Expectation 1 | ||
|
||
Each target element describes the topic or purpose of its [section of the content](#section-of-content). | ||
The [visible](#visible) [content](https://www.w3.org/TR/WCAG21/#dfn-content) of each target element describes the topic or purpose of the entirety or a part of its [section of the content](#section-of-content), or the `heading` has no section of the content. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The visible content of each target element describes the topic or purpose of the entirety or a part of its section of the content, or the heading
has no section of the content.
change to...
The visible content of each target element describes the topic or purpose of its section of the content in part or in it's entirety, or the heading
has no section of the content.
|
||
### Expectation 2 | ||
|
||
The [accessible name](#accessible-name) of each target element describes the topic or purpose of the entirety or a part of its [section of the content](#section-of-content), or the `heading` has no section of the content. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous comment, this doesn't sound right... "...describes the topic or purpose of the entirety or a part of its section of the content."
|
||
## Assumptions | ||
_There are currently no assumptions._ | ||
This rule assumes that while having a heading that has no section of content might be a WCAG violation under other success criteria (e.g. 1.3.1 Info and Relationships, if the heading markup has been misused for purely presentational purposes), this is allowed under success criterion 2.4.6 Headings and Labels: Headings and labels describe topic or purpose. |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Heading marked up with `h` element that describes the topic or purpose of a part of its section of the content. | ||
|
||
```html | ||
<h1 class="target">Oranges</h1> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the target class for? It seems redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No clue, it comes from the test case I copied+modified. Many of the test cases have class="target"
on them. I will remove it.
|
||
#### Passed example 10 | ||
|
||
Visible heading is made up by an image of text, that also has an accessible name. Both visible content and accessible name is descriptive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The visible heading is made up of an image of text, that also has an accessible name. Both the visible content and the accessible name describe the content.
#### Failed example 5 | ||
Empty heading marked up with `h` element. | ||
Heading marked up with `h` element where the visible text nodes describe the content, but the accessible name doesn't. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I should be flagging this stuff but it seems like you are using a kind of short form of English
Heading marked up with h
element...
as opposed to
A heading is marked up with an h
element...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was there in the rule when I started editing it. I'll change it if the native English speaker says so :)
Thanks for all the great feedback! I have worked in the changes now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @annethyme for the great work done with this rule. I'm not really sure I should be approving this one since I'm one of the authors, although it has changed a lot since the initial input. Please dismiss my review if I'm not supposed to review.
On a final note, I agree with @Brynanders suggestion for shortening that note. His proposal is much easier to comprehend. I haven't gone through the newest ACT rules format, but if there is a place to justify why something that passed needs further testing this would be the note to include there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@annethyme - Good work on updating this rule!
I am also listed as one of the authors, but will provide my review. Please dismiss if I am not supposed to review/approve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work! I cannot find anything I would change.
Maybe we want to add notes to the passed examples that would fail WCAG (just not this rule) so people don't use them as examples for their websites.
Suggestion for splitting up this rule in two: Suggested rule 1: Visible heading is descriptiveApplicabilityThis rule applies to any visible element with the semantic role of ExpectationThe visible heading of each target element describes the topic or purpose of its visible section of the content in part or in its entirety, or the Suggested rule 2: Accessible name of heading is descriptiveApplicabilityThis rule applies to any element with the semantic role of
ExpectationThe accessible name of each target element describes the topic or purpose of its section of the content that is included in the accessibility tree in part or its entirety, or the |
@kasperisager is on board with the suggested split up, so @annethyme will split up the rule to get it ready for review soon again. |
- [ARIA12: Using role=heading to identify headings](https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA12) | ||
- [HTML 5.2 Standard - Heading content](https://www.w3.org/TR/html52/dom.html#heading-content) | ||
|
||
## Test Cases - UPDATE IN PROGRESS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@annethyme, make sure to update this
## Applicability | ||
|
||
This rule applies to any element with the [semantic role](#semantic-role) of `heading` that is [included in the accessibility tree](#included-in-the-accessibility-tree), has an [accessible name](#accessible-name) that is not only [whitespace](#whitespace), and where: | ||
- the [accessible name](#accessible-name) is different than the [visible](#visible) heading, OR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tentative suggestion from Kasper and Anne:
- the accessible name does not match the visible heading that is the combined characters formed by the visible descendant text content and characters in images of text.
## Applicability | ||
|
||
This rule applies to any element with the [semantic role](#semantic-role) of `heading` that is [included in the accessibility tree](#included-in-the-accessibility-tree), has an [accessible name](#accessible-name) that is not only [whitespace](#whitespace), and where: | ||
- the [accessible name](#accessible-name) does not [match](#matching-characters) the [visible](#visible) heading that is the combined [characters](#character) formed by the [visible](#visible) [descendant text content](#) and [characters](#character) in [images of text](https://www.w3.org/TR/WCAG21/#dfn-images-of-text), OR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flat tree text content: the concatenation of the data of all text node descendants of node in the flat tree, in tree order.
[visible] images of text that are descendants of the test target in the flat tree
This rule applies to any [visible](#visible) element with the [semantic role](#semantic-role) of `heading`. | ||
|
||
This rule applies to any element with the [semantic role](#semantic-role) of heading that is either [visible](#visible) or [included in the accessibility tree](#included-in-the-accessibility-tree). | ||
**Note:**** Headings with only [whitespace](#whitespace) are not [visible](#visible). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove **
The [visible](#visible) heading of each target element describes the topic or purpose of its [visible](#visible) [section of the content](#section-of-content) in part or in its entirety, or the `heading` has no [visible](#visible) [section of the content](#section-of-content). | ||
|
||
Each target element describes the topic or purpose of its [section of the content](#section-of-content). | ||
The [visible](#visible) heading is the combined [characters](#character) formed by the [visible](#visible) [descendant text content](#) and [characters](#character) in [images of text](https://www.w3.org/TR/WCAG21/#dfn-images-of-text). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove link to character and insert note about definition missing + create issue on character definition.
@@ -0,0 +1,290 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split this rule out into separate PR.
@@ -0,0 +1,29 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove definition from this PR
Closing due to inactivity. |
@rvantonisse wrote in #424:
Closes issue: #424
Also updating the rule to:
How to Review And Approve