Description
Problem
So currently trying to move between pinned columns using a screen reader is non trivial.
You can see an example of the problem here by unzipping the file and then dragging the file into any major browser.
Alternatively, you can go File -> Open
and then select the unzipped file. It should automatically open in your browser where you can play the video.
CantCloseDemo.swf.zip
Note: I actually can enter the center and right grid's row content in Safari. It seems like a problem with chrome.
Reason
The problem is that we have three divs that each hold their own "subtable"
left-pined | unpinned | right-pinned |
---|
content respectively. The problem with this is that a screen reader doesn't know that the pinned content is a part of the entire grid.
This is, in greater part, due to the fact that the grid is not laid out in a way that the DOM is not laied out semantically. Although the pinned columns scroll at the same rate as the main content this is because of javascript trickery.
You can see what I'm talking about in this example of UI Grid with Pinning and Aria enabled.
http://plnkr.co/edit/Rps9uQlbYvxBLI57WbMK?p=preview
Proposed Solution
- Scrap the current pinned DOM layout and start from scratch. Each row cell would be in the same div regardless of whether or not it was "pinned". The design would involve keeping track of which cells are pinned and then controlling the zindex and padding for the unpinned cells so that they would appear to "slide" behind the pinned columns. This would make it so that the DOM was semantically correct.
This is that behaviour in the JQWidgets Grid- Pros
- We would have a semantically correct DOM layout making future a11 needs easier.
- Would mean that scrolling no longer had to be synchronized across three dom elements.
- Cons
- Would require a rewrite of a lot of code.
- Would probably be better for 4.0 Angular 2 rewrite.
- Would probably break version compatibility for people who have done directive stacking
- Harder to keep pined
- Pros
- Keep the existing DOM layout and add extra "hidden" columns between the pinned borders.
These columns would have one exclusive purpose. They would provide "focus jumping" buttons that would jump the focus from the pinned "subtable" your screen reader cursor is on to the table directly adjacent to your cell.- Pros
- Easier to implement
- Provides necessary navigation between tables without losing what row you are on.
- Could control the grid so that while "focus jumping" the main grid content would auto scroll all the way to one side or the other.
- Cons
- It would add 4 cells per row for left and right pinning respectively.
- It may not be as intuitive for a user because it doesn't really follow any of the Web AIM standards.
- It may add a lot of watchers for cells that most users won't even see.
- Pros