-
-
Notifications
You must be signed in to change notification settings - Fork 601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyboard and ARIA accessibility of tree grid #709
Comments
The keyboard navigation model is just my current suggestion. There is no major precedent for it, so it's possible the community will decide that it's not ideal. However, having row navigation and focus be the default seems right, otherwise the user will miss important information. |
I'm following up with some colleagues and we have some other ideas that might work really well. So let's hold off just a bit until I get more thoughts together on this! |
Thanks for taking the time! Another aproach is described in #655. If I understand correctly, this is a recommended for WAI treegrids, The discussion result could be documented in a wiki document, like this (outdated). Even if I may not be able to implement all of it immediately: I consider the ARIA feature very important, and really apreciate your input. |
I've started to engage the WAI ARIA authoring guide on this. See w3c/aria-practices#91 -- I'm planning to work up a proposal. |
Great! |
Here's an example I'm showing around now: What do you think? |
I love it. Take a look at how I am doing it. Personally I am amazed that way more people are not using FancyTree. Chris |
@aleventhal nice work! I haven't yet tried it with a screen reader, but some unstructured thoughts:
I am not sure if this assumption always holds:
(But maybe if they have, they may be hard to make accessible :-/) Anyway, the specification and demo should include concrete guidelines how to handle I am not saying that gridnav is the 'best' approach, of course. It just was handy in
Again, I don't propose that this for the specification, just add it as a Some unstructrued questions for discussion:
An alternative approach that we could investigate is to have a separate 'edit-mode'
If often used a large treegrid with lots of controls as main component of a page. |
We could introduce new keystrokes that separate expand vs. next column, but it would not be discoverable. An earlier prototype used the move-by-word keys to switch columns. We could add them back in as well. It just would not be discoverable, so I'm not sure it's worth it.
I like it this way because you can arrow to the next row and then tab, and there are a reasonable number of items in the tab order. If tab went to the next row, the user would not be able to escape to the next widget in the case of 1000s of rows.
An earlier version needed this assumption because there was not an easily discoverable move by cell command. However, with the addition of right arrow and tab, I feel that we can remove this as an assumption.
Agreed. I'll add that in at some point. Looking at your gridnav example, the only issue I have with it is that the title column is tabbable. IMO that's really a problem because it's common to have many many rows, and so effectively you are locking users into that widget. I prefer the solution where tabbing only works on the active row, and arrows move to other rows.
Yeah, I'm not saying my approach is necessarily the best either, but I'm trying to get consensus within the ARIA working group too. With lots of different ideas that may be the most difficult thing about this problem
Do you think it's better than having the default be row focus? To me that's easier to understand. I'm not sure if users will understand that there is a special column that does different things.
Yes, although as you pointed out a textfield or select may take some of those keys
Merged cells - focus them as a group or the first cell of the group
I'd say reachable via arrows but not tabs.
IMO active row because of the many rows tabbing problem
IMO it depends on row vs. cell mode
I don't think users will know about F2 or other keys, but maybe Enter. It's probably ok if they just drop down immediately.
I would say just start editing
We explode! Actually I suppose they can all easily be in the tab order for the active row.
I don't like using keys that no one else uses. No one knows about them and you also run the risk of conflicting with browser, OS or web app keys. Are we at all close to finding a common solution? :) |
There's only one way to find out ;) |
I'm calling into the ARIA authoring guidelines taskforce meeting today and
this is on the agenda. I'll let you know what happens.
Aaron
…On Mon, Apr 17, 2017 at 11:35 AM Martin Wendt ***@***.***> wrote:
Are we at all close to finding a common solution? :)
There's only one way to find out ;)
I can draft a protoype extension that follows your spec during the next
days, so we can play with it in addition to your example implementation.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#709 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUAZmkD0M9bEGFBU2mk608LZg-LI8yDks5rw4a8gaJpZM4Mm26u>
.
|
Also, the screen reader support works better in some cases than others.
That's part of why it needs work. Best in Firefox. If you're playing with
in a screen read with Chrome, use Canary.
Aaron
On Mon, Apr 17, 2017 at 11:36 AM Aaron Leventhal <[email protected]>
wrote:
… I'm calling into the ARIA authoring guidelines taskforce meeting today and
this is on the agenda. I'll let you know what happens.
Aaron
On Mon, Apr 17, 2017 at 11:35 AM Martin Wendt ***@***.***>
wrote:
> Are we at all close to finding a common solution? :)
>
> There's only one way to find out ;)
> I can draft a protoype extension that follows your spec during the next
> days, so we can play with it in addition to your example implementation.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#709 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABUAZmkD0M9bEGFBU2mk608LZg-LI8yDks5rw4a8gaJpZM4Mm26u>
> .
>
|
I have a grand unified theory of treegrids for everyone. I'd love some feedback. Same code, different focus options. It turns out that sometimes people want a treegrid that's more like a tree, and sometimes they want it to behave more like a grid. The difference seems to be whether the rows focus by default, and whether rows can get focus at all. This is the same code with a different value for the URL param called cell: Internally, the URL parameter sets the boolean variables doStartRowFocus and doAllowRowFocus. There is hardly any branching logic required. The aria-expanded attribute is mirrored from the row to the first cell. Pressing Enter on the first cell is another way of toggling expansion. |
Thats great news. I will implement your latest changes to the spec, and we can have an option to toggle the mode as well. There are still some problems with focus behavior when cells contain embedded checboxes or text inputs in combination with cursor keys, tab key and/or clicking. Hope to fix this this until next weekend, so we have another prototype evaluate. I think I can simply add this to the trunk and put it online, since hardly any changes were needed in the core code. |
btw. one idea I experimented with was to allow ESC to switch from cell mode back to row mode. What do you think? (and maybe ENTER to switch from row- to cell-mode, but I am not so sure here) |
Awesome. I imagine a config option called cellFocus with the following values:
Here are some ARIA recommendations:
Keyboard:
Edits:
|
Getting closer to a spec / design pattern over here: I can review your branch when you're ready. |
I merged the ext-ariagrid extension to master (example here, code here). I have not yet implemented all of your recommendations above, so it is a bit too early for review - I'll let you know. BTW. I agree that aria should be enabled by default, when the spec has settled and performance is not affected too much, so the extension may become part of ext-table later. |
Yes, we can remove aria-labelledby even from the tree view. Browsers have a "name from contents" rules that is utilized on elements of role treeitem. This is also true of role="row" although Chrome only does this correctly for row in recently nightly builds. aria-posinset, aria-setsize and aria-level should be implemented for the treegrid, since all of the rows are at the same level. For the normal tree, there appears to be enough DOM structure that the browser can compute this on behalf of the screen reader. I will doublecheck that later and let you know if there's an issue with that. Have you seen any performance issues caused by ARIA usage before? |
I see, thanks.
I observed that small changes to the rendering logic sometimes had unexpected (by me) impact. |
ARIA should not affect performance much at all. It's not even processed
by the browser outside normal code paths for attributes, unless a screen reader is requesting information about the accessible object hierarchy. So it should have about the same affect as
adding any attributes would.
Aaron
…On Mon, Apr 24, 2017 at 1:06 PM Martin Wendt ***@***.***> wrote:
I see, thanks.
Have you seen any performance issues caused by ARIA usage before?
I observed that small changes to the rendering logic sometimes had
unexpected (by me) impact.
Havn't measured aria so far, just mentioned it, because performance with a
high number of nodes is one important requirement. We can simply benchmark
and/or optimize, once the spec is implemented.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#709 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUAZsjaoo4M8Zu55rXpLEWYe6Ah_Ozdks5rzNZ4gaJpZM4Mm26u>
.
|
Also usability for huge grids with embedded cells is an important use case for Fancytree. I am still a bit concerned about having to expand (potentially a lot of) nodes, just to switch to cell mode. Same with having to cursor to the boundaries just to switch back to row-mode, because I want to expand or collapse now.
Agreed, but in row-mode? Your current implementation defines alert column 3 as default action.
Too bad, I wasn't even aware of a forms mode. So rows could be handled as another layer of edibility, so that "cell-mode" means "edit-row"-mode and it seems to have a nice symmetry:
Any hope that Esccan be handled by screen readers this way, if W3C specifies so? This would also help with the problem in my current implementation, where you can get stuck in a text-input when you move around with cursor keys. Then only Tab can get you out. As you can see, I am a complete greenhorn concerning screen reader behavior, so hopefully some of the above makes sense :) |
Sounds good.
Do you envision row mode being used for huge grids? Or is it more natural to use ?cell=force mode where there is no row focus? I feel like row mode is for grids that are more like trees -- usually fewer columns.
Ultimately the authoring guide is a guide, and they are just suggestions to help the community deal with all the confusion in accessibility, by providing something that helps bring everyone together on the basics as much as possible. If someone comes up with a better way, they should use it as long as users can discover it and it doesn't confuse everyone by being completely different, and yet calling itself the same thing.
It could. Maybe it's better. FWIW all of these things are just suggestions, so if you like this better, maybe other people will too. Not that many people have weighed in yet. I'll see what people think of using Enter.
Yes, it works in those 2 cases. I've been told those are exceptions that the screen readers allow because it's so expected.
The problem is really the JAWS screen reader, which is like the IE of the accessibility world. Even if we get them to update JAWS, lots of people don't update. It doesn't help that the updates cost a lot of money. We try to avoid creating incompatibilities with current screen readers as a matter of pragmatism. It can suck. But when we get idealistic and try to make everything better, yet older stuff doesn't work, it also sucks.
Screen reader stuff is hard. I guess the keyboard navigation is really separate from screen reader stuff, so you are as good as anyone on that. Keep asking questions and we'll get somewhere. I like the Enter/escape idea unless there is a default action. I wish that Escape was not an issue for screen readers in the non textedit/popup cases. None of us like that. Maybe we'll find a workaround, I can try to find out more. |
Thanks for taking the time to answering and sharing some background. I ping you when I have s.th. testable (please allow some time for me to implement). |
Hi @mar10, let me know if there's any way I can help. |
Hey @aleventhal , I finally found some time to work on the prototype. There are still some problems when navigating in the different modes with Cursor-Keys, Tab-Keys, and mouse clicks, but if you like, you could give some early feedback. I added the p.s. |
Thanks @mar10 -- here's an updated rawgit link: |
Hi, I checked out the example. Here are my suggestions for markup improvements, from most important to least:
Would you like me to help with the code? I'd be happy to. |
Thanks for looking into it!
Do we need to render IDs on all rows and cells or can we simply use a constant ID Concerning the 'button' and 'img' roles, I did not know what I was doing there, probably seen it somewhere else. We should change as you suggested.
sure, very welcome! |
@aleventhal fyi, I fixed and uploaded your first two suggestions... |
You could use a counter or even alternate between 2 ids this way. |
Excellent: I tried master with NVDA and Chrome Canary, and got much better results than before. Obviously there is still polish but this works well enough that once it's released, I can start testing automation-inspector with my colleagues that use screen readers. (It's at https://github.com/google/automation-inspector if you're curious.) |
It's good enough that I would love to use it as soon as I can. What do you still need to do before you are ready to release it? |
I released as patch, since still unofficial and I want to merge another branch into the next feature release. Let me know how it works out :) |
We are closer, but I believe the regular ARIA tree is not working as well as it used to. In a regular tree, the aria-activedescendant is pointing to something like a |
I probably broke that recently, but I think before active-descendant was pointing to |
For some roles, the ones marked NameFrom contents in the spec, the reader will read all the descendant text and labels. So yes, the screen reader will get the right thing here. Let's point it to the parent. |
I released the current state as patch (I will be mostly offline next week) |
We are very very close. Here are some recommended improvements:
My apologies if I led you down the wrong path on that before. |
Since you're going to be traveling, here's a PR for theses issues: |
Thank you Aaron, and sorry for the delayed response! ad A.1. ad A.2. ad B.
No problem; we should go as many rounds as it takes to find the optimum :) |
I'll take care of the Chromevox experience with any necessary patches, so no worries there. I haven't tested there recently as I've been waiting for some of the fixes to make it into the developer channel. I'll probably need to make more patches to Chrome and Chromevox itself in the end. |
@mar10, the PR is updated. |
@aleventhal merged, thanks. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
While the accessibility of a normal tree is in very good shape, the treegrid is a little bit of a problem for screen reader users (although it has a great start).
The treegrid only puts focus on the first cell of each column. This means that as the user navigates up and down between rows, the user only hears the information in the first column, and it isn't even necessarily clear that there are other columns. Solving this is not necessarily simple.
I don't think there have necessarily been a lot of great accessible treegrid widgets made in the past, so we are breaking a little ground here. This may take a couple of rounds and testing with some users to get it right. I can help with the testing and ARIA recommendations, etc.
What do you think about having a separate row navigation mode and column navigation mode?
Row navigation mode:
Column navigation mode:
Other:
The text was updated successfully, but these errors were encountered: