Empty lang attribute detected as not well-formed
FlorentTorregrosa opened this issue · comments
Hello,
I am using Pa11y-CI to scan my Drupal website and it returned:
The language specified in the lang attribute of this element does not appear to be well-formed.
(#comment-30 > footer > p > span:nth-child(1) > span)
<span lang="" typeof="schema:Person" property="schema:name" datatype="">Anonymous (non vérifié)</span>
You can see the "problem" when there is a comment, example: https://florent-torregrosa.fr/blog/headers-http-pour-la-securite-avec-drupal
First I opened an issue on Drupal core: https://www.drupal.org/project/drupal/issues/3203292 but as said in the comment https://www.drupal.org/project/drupal/issues/3203292#comment-14144276, an empty lang attribute is allowed in HTML specification.
- Pa11y-CI config: https://gitlab.com/florenttorregrosa-drupal/docker-drupal-project/-/blob/9.x/scripts/tests/pa11y/pa11y-dev.json
- Docker image I use to run Pa11y-CI: https://hub.docker.com/r/florenttorregrosa/pa11y-ci (source: https://gitlab.com/florenttorregrosa-docker/images/docker-pa11y-ci)
- Pa11y-CI version: 2.4.1 (https://gitlab.com/florenttorregrosa-docker/images/docker-pa11y-ci/-/jobs/1312070120)
Thanks for any help.
Hi @FlorentTorregrosa, thanks for using Pa11y 😄
From your config, it looks like you're using HTML_Codesniffer (the default rules engine), so you'll want to raise this with the HTML_Codesniffer team instead. Squizlabs maintain the ruleset, their repo is here: https://github.com/squizlabs/HTML_CodeSniffer
You can see the rule itself in their ruleset listing here: https://squizlabs.github.io/HTML_CodeSniffer/Standards/WCAG2/ (SC 3.1.2: Language of Parts (Level AA))
I'm going to close this issue now since you'll need to make the request with Squizlabs - good luck!
Hello @hollsk,
Thanks for the quick reply and for pointing me to the correct project :)