WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Angular and WCAG 4.1.1

for

From: glen walker
Date: Jun 12, 2020 10:42AM


Also, the official HTML spec says that custom attributes should start with
"data-"

https://www.w3.org/TR/html53/dom.html#embedding-custom-non-visible-data-with-the-data-attributes

If you try the NU validator (https://validator.w3.org/nu/#textarea) and try
a simple text example and have

<p _ngvar-c0="foo"></p>

It flags it in error with the message you mentioned. However, if you put
"data-" in front of it, it parses cleanly.

<p data-_ngvar-c0="foo"></p>

But as Jared said, custom attributes don't apply to 4.1.1