WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Code fix for every cell in a table being focusable

for

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

From: Mark Magennis
Date: Mon, Jan 04 2021 9:24AM
Subject: Code fix for every cell in a table being focusable
No previous message | Next message →

The recent discussion about every cell in a table being tab-focusable has prompted me to wonder about what's the best fix. That discussion was about an ng-grid table but I've also seen it with tables generated using ext.js where each cell has tabindex="0".

I'm not a JavaScript whizz by any means but presumably it's just a simple case of running a script after the page has loaded (and also after a new row has been added if the table allows that) to strip out the tabindexes. Has anyone done that and is it really that simple? Are there any difficulties, such as finding out the cell's id's? Or is there a better approach that I can recommend if I come across this in future?

Thanks,
Mark

From: Swift, Daniel P.
Date: Mon, Jan 04 2021 10:38AM
Subject: Re: Code fix for every cell in a table being focusable
← Previous message | No next message

Mark:

I haven't done what you are specifically describing, but I've done similar things in certain situations where I didn't have access to the code which we needed to change. It's about as simple as you describe ... wait for the page to load, find everything within a container that has a certain attribute, and remove that attribute. You should be able to achieve that with a few lines of code.

Daniel Swift, MBA
Senior Web Specialist
University Communications and Marketing
West Chester University
610.738.0589

From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = > On Behalf Of Mark Magennis
Sent: Monday, January 4, 2021 11:24 AM
To: WebAIM Discussion List < = EMAIL ADDRESS REMOVED = >
Subject: [WebAIM] Code fix for every cell in a table being focusable

The recent discussion about every cell in a table being tab-focusable has prompted me to wonder about what's the best fix. That discussion was about an ng-grid table but I've also seen it with tables generated using ext.js where each cell has tabindex="0".

I'm not a JavaScript whizz by any means but presumably it's just a simple case of running a script after the page has loaded (and also after a new row has been added if the table allows that) to strip out the tabindexes. Has anyone done that and is it really that simple? Are there any difficulties, such as finding out the cell's id's? Or is there a better approach that I can recommend if I come across this in future?

Thanks,
Mark