Update rules mapping for SC 3.1.1 Language of Page to address empty content [bf051a, ucwvc8, b5c3f8]#2407
Update rules mapping for SC 3.1.1 Language of Page to address empty content [bf051a, ucwvc8, b5c3f8]#2407giacomo-petri wants to merge 8 commits intodevelopfrom
Conversation
✅ Deploy Preview for act-rules ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Jym77
left a comment
There was a problem hiding this comment.
Good point. We can tighten it a bit with existing definition.
| - is in a [top-level browsing context](https://html.spec.whatwg.org/#top-level-browsing-context); and | ||
| - has a [node document](https://dom.spec.whatwg.org/#concept-node-document) with a [content type](https://dom.spec.whatwg.org/#concept-document-content-type) of `text/html`. | ||
| - has a [node document](https://dom.spec.whatwg.org/#concept-node-document) with a [content type](https://dom.spec.whatwg.org/#concept-document-content-type) of `text/html`; and | ||
| - has at least one [descendant](https://dom.spec.whatwg.org/#concept-tree-descendant) [text node][] which is neither empty nor only [whitespace][].. |
There was a problem hiding this comment.
Question: Shouldn't the rule also apply if there is only replaced content that needs language (alt text of images, …)?
Maybe use "there is some text inheriting its programmatic language from the document element, which is neither empty nor only whitespace." like in the "element's lang" rule.
There was a problem hiding this comment.
Yeah, I had considered that but then forgot about it. And the reason why is that for 3.1.2 rules, the assumption is that the HTML has a lang defined. If no language is set, it becomes tricky. I'll think about how to handle that and how to address the problem of "equivalent" text.
| - The [document element][] has a [content type][] of `text/html`; and | ||
| - The [document element][] has a defined [default page language][]. | ||
| - The [document element][] has a defined [default page language][]; and | ||
| - The [document element][] has at least one [descendant](https://dom.spec.whatwg.org/#concept-tree-descendant) [text node][] which is neither empty nor only [whitespace][]. |
There was a problem hiding this comment.
Same remark about having "text inheriting the language".
| - is in a [top-level browsing context](https://html.spec.whatwg.org/#top-level-browsing-context); and | ||
| - has a [node document](https://dom.spec.whatwg.org/#concept-node-document) with a [content type](https://dom.spec.whatwg.org/#concept-document-content-type) of `text/html`. | ||
| - has a [node document](https://dom.spec.whatwg.org/#concept-node-document) with a [content type](https://dom.spec.whatwg.org/#concept-document-content-type) of `text/html`; and | ||
| - has at least one [descendant](https://dom.spec.whatwg.org/#concept-tree-descendant) [text node][] which is neither empty nor only [whitespace][]. |
There was a problem hiding this comment.
Same remark about "text inheriting the language".
Closes issue(s): #2406
This PR introduces a new exception to the rules mapping for SC 3.1.1 Language of Page, ensuring that pages with no content are treated as an exception, since there is no lang to communicate to the user.
Need for Call for Review:
This will require a 2 weeks Call for Review
How to Review And Approve