WebAIM - Web Accessibility In Mind

E-mail List Archives

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

for

From: tim.harshbarger
Date: Jul 31, 2023 8:09AM


You may want to patch your framework so that it only adds the id, role, and name attributes when they are not null.

The thing with invalid markup like this is that it might work OK today. It might always work OK. However, since it is invalid markup, there is no guarantee that it will continue to work. And by the time you notice it is no longer working, the issue will be everywhere and cause a lot of people major headaches.

If it is a possibility, you might want to add a fix for this on the road map of whatever framework you might be using or whatever code is generating this.