ampproject / ampproject/amphtml
♿ Make validator explicitly look for `lang` attribute on document and `alt` on images?
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
## Describe the new feature or change to an existing feature you'd like to see
A large part of the relatively trivial accessibility issues found during the recent audits of AMP components and documentation was the general lack of `lang` attributes on the `` element and the lack of `alt` attributes on image elements (``. `amp-anim`, etc).
These are the sort of omissions that are flagged as warnings by the regular [W3C HTML validator](https://validator.w3.org/nu/).
Would it make sense to have the AMP validator to also look for these relatively straightforward things (noting that `alt` text - and `alt=""` empty attribute to explicitly denote purely presentational images - is in general required for [WCAG 2.1 SC 1.1.1](https://www.w3.org/TR/WCAG/#non-text-content), and use of `lang` for [WCAG 2.1 SC 3.1.1](https://www.w3.org/TR/WCAG/#language-of-page)
Contributor guide
Assessment
This issue has not been assessed yet.