WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Does providing null ("") for Role, Name, id break Accessibility in any way ?

for

From: jp Jamous
Date: Jul 29, 2023 1:44PM


While everything is working good, I would fail this if I was testing a page. Also, automated tools would fail it.

The ID may not be the biggest concern, but the Role would be. It would fail Role, Name Value.

I prefer to have values for all of those by default, then the script can change them when the JS execute. Nothing wrong with this approach. However, leaving them empty is bad markup and would fail 1.4.2.

-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of allyssa jessicon
Sent: Saturday, July 29, 2023 2:40 PM
To: <EMAIL REMOVED>
Subject: [WebAIM] Does providing null ("") for Role, Name, id break Accessibility in any way ?

Hello list,

We have a piece of code where id="" , role="" and name="" (all null) used in many scenarios for various reasons, running automated scripts for the page containing the code resulting in failure with the message "Element does not have inner text that is visible to screen readers".
Is this a cause of concern for Accessibility? The controls work just fine with all major screen readers though.

Appreciate your response.


Thanks.