Add two W3C Validation Errors
Two HTML validation errors that I'm getting with validator.w3.org that I'm not getting with this tool are…
-
“Error: When the srcset attribute has any image candidate string with a width descriptor, the sizes attribute must also be specified.” This is for the
<source>
sub-element inside the<picture>
element when using widths in the<source>
'ssrcset
attribute. This is apparently invalid HTMl but I wouldn't have known using this good tool alone. -
“Error: The element foo must not appear as a descendant of an element with the attribute role=button.” (I added the "foo" part) I got this error when using
<div role="button">
and then putting in block elements inside it. We have a general error message for this that says: “Prefer to use the native element. See: https://html-validate.org/rules/prefer-native-element.html”, but I think this message isn't specific enough to cover this validation error. In some edge cases, using the native elements isn't feasible (as in my strained example of<div role="button">
), so tracking this additional HTML validation error could be beneficial in those rarer cases.
Thank you for your time and consideration!