WebAIM - Web Accessibility In Mind

E-mail List Archives

Code fix for every cell in a table being focusable

for

From: Mark Magennis
Date: Jan 4, 2021 9:24AM


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