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
FINAL: SC3-1-1-html-has-lang #107
Conversation
jeeyyy
commented
Apr 27, 2018
- Rule based on draft - Draft: SC-3-1-1-html-has-lang #85
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.
I am not sure we need the Accessibility Support note if this rule is only checking if there is a lang
and xml:lang
. In otherwise the note is about using both lang
and xml:lang
but the rule just cares if one or the other is present.
_rules/SC3-1-1-html-has-lang.md
Outdated
@@ -25,13 +25,15 @@ The root element of the page, if it is an `html` element. | |||
|
|||
The test target has a `lang` or `xml:lang` attribute. | |||
|
|||
**Note**: HTML 5 recommends using `lang` instead of `xml:lang`. This is not known to impact accessibility, which is why use of both is permitted by this rule. |
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.
"HTML 5" should be "HTML5".
- Added test cases for empty lang / xml:lang attributes.
- added passed test cases
_rules/SC3-1-1-html-has-lang.md
Outdated
|
||
### Expectation | ||
|
||
The test target has a `lang` or `xml:lang` attribute. |
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.
Add non-empty here like in the description:
"The test target has a [non-empty][] lang
or xml:lang
attribute."
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.
Agreed.
```html | ||
<html xml:lang="en" lang=""> | ||
``` | ||
|
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.
I suggest adding a passed test case with a non-valid value too, to make clear that we don't test the validity of the values in this rule, e.g.:
<html lang="xyz">
<html xml:lang="xyz">
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.
Please review my comments before merging.
_rules/SC3-1-1-html-has-lang.md
Outdated
@@ -0,0 +1,94 @@ | |||
--- | |||
name: Existence of HTML Lang attribute |
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.
Why not "HTML has lang attribute"?
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.
Smart 🥇
_rules/SC3-1-1-html-has-lang.md
Outdated
|
||
### Expectation | ||
|
||
The test target has a `lang` or `xml:lang` attribute. |
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.
Agreed.
Changes done. Review again. |
Changes implemented. Review again.
editorial update