top | item 30923226

(no title)

jassmith87 | 3 years ago

I've done a lot of work on data grid accessibility. In fact, DataGridXL is one of the many grids I considered for our own needs a couple years ago. The reality here is unless you somehow export out a DOM structure which has an element per cell, for at least the cells that are on screen, you will never be able to get the screen reader to behave correctly. If you were using a canvas you could export a subdom on the canvas, but with the approach y'all take with the line-height + dom node per column I don't see how you get there.

The cell nodes need be browsable and selectable by the screen readers caret. You could do what many other DOM based grids do and add an "accessibility mode" but I believe accessibility should be the default and not a mode people turn on as a checkbox. Let me know if you want to chat, I'm always happy to share what I know. I'm by no means an expert but I've definitely picked up a thing or two.

discuss

order

nightski|3 years ago

Seems pretty much impossible to not have an accessibility mode yet have features such as fixed columns/rows. It would be very difficult to have a clean DOM structure while supporting that layout. If it is possible I'd be very interested in how that is done.

jassmith87|3 years ago

It can be done if you are using a Canvas to provide the rendering. The canvas can then be provided with a subdom that does not render but is visible/interactive to screen readers which matches exactly what the screen reader requires. Canvas's actually have the advantage here if they put the effort into being accessible.

You could do the same trick by hiding the visible DOM from the screen reader and creating an invisible DOM explicitly for the screen reader. If your DOM structure is wrong for the screen reader I would suggest doing this.