Permalink
Cannot retrieve contributors at this time
31 lines (21 sloc)
709 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/eslint-plugin-jsx-a11y/docs/rules/lang.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# jsx-a11y/lang | |
<!-- end auto-generated rule header --> | |
The `lang` prop on the `<html>` element must be a valid IETF's BCP 47 language tag. | |
## Rule details | |
This rule takes no arguments. | |
### Succeed | |
```jsx | |
<html lang="en"> | |
<html lang="en-US"> | |
``` | |
### Fail | |
```jsx | |
<html> | |
<html lang="foo"> | |
``` | |
## Accessibility guidelines | |
- [WCAG 3.1.1](https://www.w3.org/WAI/WCAG21/Understanding/language-of-page) | |
### Resources | |
- [axe-core, valid-lang](https://dequeuniversity.com/rules/axe/3.2/valid-lang) | |
- [Language tags in HTML and XML](https://www.w3.org/International/articles/language-tags/) | |
- [IANA Language Subtag Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) |