|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
791 bytes
|
| Line | |
|---|
| 1 | # jsx-a11y/html-has-lang
|
|---|
| 2 |
|
|---|
| 3 | 💼 This rule is enabled in the following configs: ☑️ `recommended`, 🔒 `strict`.
|
|---|
| 4 |
|
|---|
| 5 | <!-- end auto-generated rule header -->
|
|---|
| 6 |
|
|---|
| 7 | <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).
|
|---|
| 8 |
|
|---|
| 9 | ## Rule details
|
|---|
| 10 |
|
|---|
| 11 | This rule takes no arguments.
|
|---|
| 12 |
|
|---|
| 13 | ### Succeed
|
|---|
| 14 | ```jsx
|
|---|
| 15 | <html lang="en">
|
|---|
| 16 | <html lang="en-US">
|
|---|
| 17 | <html lang={language}>
|
|---|
| 18 | ```
|
|---|
| 19 |
|
|---|
| 20 | ### Fail
|
|---|
| 21 |
|
|---|
| 22 | ```jsx
|
|---|
| 23 | <html>
|
|---|
| 24 | ```
|
|---|
| 25 |
|
|---|
| 26 | ## Accessibility guidelines
|
|---|
| 27 | - [WCAG 3.1.1](https://www.w3.org/WAI/WCAG21/Understanding/language-of-page)
|
|---|
| 28 |
|
|---|
| 29 | ### Resources
|
|---|
| 30 | - [axe-core, html-has-lang](https://dequeuniversity.com/rules/axe/3.2/html-has-lang)
|
|---|
| 31 | - [axe-core, html-lang-valid](https://dequeuniversity.com/rules/axe/3.2/html-lang-valid)
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.