WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Angular and WCAG 4.1.1

for

Number of posts in this thread: 5 (In chronological order)

From:
Date: Fri, Jun 12 2020 6:52AM
Subject: Angular and WCAG 4.1.1
No previous message | Next message →

Hello, could anybody please help with some good thought?

Websites build with Angular always put attributes into HTML element. eg: _ngvar-c0. Validator mark these attributes as error: "Attribute _ngvar-c0 not allowed on element..."

WCAG states that Validating webpages (G134) is sufficent technique fpr 4.1.1.

Understanding SC 4.1.1. says: "the Success Criterion requires that the content can be parsed using only the rules of the formal grammar."

Consequenty all Angular websites violates WCAG 4.1.1? This sounds strange. Maybe I misunderstand something?

Many Thanks,
Zsolt

From: Jared Smith
Date: Fri, Jun 12 2020 8:49AM
Subject: Re: Angular and WCAG 4.1.1
← Previous message | Next message →

Zsolt -

The success criterion itself lists the types of HTML parsing errors
that would result in a failure. Custom attributes are not included in
this list, so this is not a WCAG failure. While such attributes are
unnecessary and always make me shake my head when I see them, they
have no direct impact on accessibility.

> Understanding SC 4.1.1. says: "the Success Criterion requires that the content can be parsed using only the rules of the formal grammar."

This is a significant overstatement. The Understanding document is not
a part of the normative guidelines, so this incorrect statement can be
ignored.

Thanks,

Jared

From: glen walker
Date: Fri, Jun 12 2020 10:42AM
Subject: Re: Angular and WCAG 4.1.1
← Previous message | Next message →

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

From:
Date: Fri, Jun 12 2020 10:44PM
Subject: Re: Angular and WCAG 4.1.1
← Previous message | Next message →

Hi Jared and Glen,

Thank you for your answer.

Zsolt


2020. 06. 12. 16:49 keltezéssel, Jared Smith írta:

> Zsolt -
>
> The success criterion itself lists the types of HTML parsing errors
> that would result in a failure. Custom attributes are not included in
> this list, so this is not a WCAG failure. While such attributes are
> unnecessary and always make me shake my head when I see them, they
> have no direct impact on accessibility.
>
>> Understanding SC 4.1.1. says: "the Success Criterion requires that the content can be parsed using only the rules of the formal grammar."
> This is a significant overstatement. The Understanding document is not
> a part of the normative guidelines, so this incorrect statement can be
> ignored.
>
> Thanks,
>
> Jared
> > > >

From: Jonathan C. Cohn
Date: Sat, Jun 13 2020 5:45AM
Subject: Re: Angular and WCAG 4.1.1
← Previous message | No next message

I noticed on twiter yesterday that firefox dev tools is startting to provide some support for these attributes.

Sent from my iPhone

> On Jun 13, 2020, at 12:44 AM, Edelényi Zsolt < = EMAIL ADDRESS REMOVED = > wrote:
>
> Hi Jared and Glen,
>
> Thank you for your answer.
>
> Zsolt
>
>
> 2020. 06. 12. 16:49 keltezéssel, Jared Smith írta:
>
>> Zsolt -
>>
>> The success criterion itself lists the types of HTML parsing errors
>> that would result in a failure. Custom attributes are not included in
>> this list, so this is not a WCAG failure. While such attributes are
>> unnecessary and always make me shake my head when I see them, they
>> have no direct impact on accessibility.
>>
>>> Understanding SC 4.1.1. says: "the Success Criterion requires that the content can be parsed using only the rules of the formal grammar."
>> This is a significant overstatement. The Understanding document is not
>> a part of the normative guidelines, so this incorrect statement can be
>> ignored.
>>
>> Thanks,
>>
>> Jared
>> >> >> >> > > > >