WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Why are both validation and accessibility tools showing duplicate id's

for

From: Steve Green
Date: Dec 1, 2022 10:44AM


I think that "things more often than not get generated/injected via JS" is stretching the point a bit far, although I have seen a number of websites where the entire contents of the body were generated by scripts. Almost nothing on our website is generated by scripts other than a few attributes that we can't add in the CMS.

And if the JavaScript is targeting elements by their "id" attribute, duplicates in the original source could certainly cause problems. That's why we validate both the initial source and the DOM.

Steve Green
Managing Director
Test Partners Ltd


-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Sandy Feldman
Sent: 01 December 2022 17:21
To: WebAIM Discussion List < <EMAIL REMOVED> >; Patrick H. Lauke < <EMAIL REMOVED> >
Subject: Re: [WebAIM] Why are both validation and accessibility tools showing duplicate id's

good point!

Sandy

sandyfeldman.com <https://sandyfeldman.com> a11yready.com <https://www.a11yready.com/>



On 2022-12-01 12:14 p.m., Patrick H. Lauke wrote:
> On 01/12/2022 16:09, Sandy Feldman wrote:
>> View source and search for the code that is coming up as as having a
>> duplicate id. See if you find more than one.
>
> View source these days isn't much help, since things more often than
> not get generated/injected via JS.
>
> Open Developer Tools, DOM view, then search for the ID
>
> P