Permalink
Cannot retrieve contributors at this time
31 lines (21 sloc)
791 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/html-has-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/html-has-lang | |
💼 This rule is enabled in the following configs: ☑️ `recommended`, 🔒 `strict`. | |
<!-- end auto-generated rule header --> | |
<html> elements must have the lang prop. This rule is largely superseded by the [`lang` rule](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/lang.md). | |
## Rule details | |
This rule takes no arguments. | |
### Succeed | |
```jsx | |
<html lang="en"> | |
<html lang="en-US"> | |
<html lang={language}> | |
``` | |
### Fail | |
```jsx | |
<html> | |
``` | |
## Accessibility guidelines | |
- [WCAG 3.1.1](https://www.w3.org/WAI/WCAG21/Understanding/language-of-page) | |
### Resources | |
- [axe-core, html-has-lang](https://dequeuniversity.com/rules/axe/3.2/html-has-lang) | |
- [axe-core, html-lang-valid](https://dequeuniversity.com/rules/axe/3.2/html-lang-valid) |