-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Tabs: ARIA! DO NOT MERGE TO MASTER! #666
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
Conversation
The demo is changed purely for testing. Needs tests.
@hanshillen @ezufelt Can you check this out? You'll need to pull down my fork and test locally. |
Hi Scott, I'm really sorry. I won't have any time to look at this in the near future. Thanks for all of your work on jQuery UI accessibility. Everett Zufelt Web Follow me on Twitter On 2012-05-24, at 8:48 PM, Scott González wrote:
|
Hi Scott, please see my feedback below:
To answer your questions:
How long should the delay be for the delayed activation?
Do any AT devices announce interaction cues that contradict this implementation?
|
@hanshillen Thanks for the detailed response. I'll update accordingly and report back. |
Conflicts: ui/jquery.ui.tabs.js
…o tabs. Clean up ARIA attributes on destroy.
Fixed in 111e71c.
Sorting is handled by Sortable and won't be addressed until 2.0.
There's no built-in support for deleting tabs. This is an update that needs to happen in the one specific demo that implements tab removal.
Fixed in 111e71c with
Fixed in 111e71c.
That's annoying. It has
We can add ctrl+arrow keys as suggested. There's a collision with ctrl+up/down for paging, but we're already hijacking ctrl+up for moving focus from the panel to the tab anyway.
We intentionally don't support that since it breaks browser tab navigation in Firefox. This is even mentioned in the best practices. Ctrl+up, then right arrow is easy enough. |
Fixed in 9fc48bc. |
Fixed in 66c371a. Navigating with the control key will prevent automatic activation. |
Firefox will automatically put scrollable elements into the tab order. Perhaps we should just leave this alone for now and see if we get any feedback. I'd much rather the browser vendors just implement the Firefox behavior. |
At this point, I believe the only remaining issues for built-in functionality are:
|
OK, if it's not part of the widget no need for built in a11y support either. We can think about updating those two demos.
Confirmed
Confirmed
Probably easiest to just counter this by adding a mousedown handler to the disabled tab and calling event.preventDefault() in it.
Another option would be to only support Ctrl + Left / Right and not the vertical keys. But that may be confusing if the widget will some day be configurable as a vertical tab list.
Confirmed, it's working well. JAWS is doing some odd things with the announcement here though. first It's announcing the tab normally, but then it adds "move tab left" or "move tab right", and announces the tab all oiler again. I'm assuming this is just a JAWS quirk.
I agree about the conflicting shortcuts, but you can still consider implementing something else. I used Alt + PgUp and Alt + PgDn which is much less conflicting
OK
The collapse function now works with both Space and Enter. Didn't you say you felt that conflicted with the delay canceling shortcuts (also Space and Enter)?
|
Thanks for confirming those changes.
Yup, except that this doesn't work cross-browser. In IE, you can't prevent moving focus inside of mousedown and the focus moves asynchronously, so it's a huge pain to work around.
Ok, we can add that.
Yes, my concern is that users may try to cancel the delay but be just a bit too slow and then end up collapsing. If we make space not collapse, would enter still cancel the delay? Are there stats about how people normally activate elements (space vs. enter)? |
That's strange, I tried it out in IE9 and it seemed to work. I used the following line on your demos/tabs/default.html demo: $("#ui-id-3").mousedown(function(event){event.preventDefault();});
I don't have any stats no. Traditionally Space is for toggling (e.g. checkboxes) and Enter is for Activating (e.g. links). So using Space for collapsing and expanding the tab list and Enter for immediately activating the tab (canceling the delay) would make sense to me (I realize I said the opposite initially, so disregard the earlier statement about Enter and Space). Of course whatever you do some people going to be confused. I'm really starting to wonder if it would make sense to have a consistent shortcut (either built into widget or as a separate plugin that developers can add) that can be used to get context sensitive instructions about how to use the currently focused widget. The instructions could be a tooltip in combination with a live region for example, or a dialog popping up. But that's outside the scope for this PR of course. |
Sorry, I should've been more specific. IE 6/7/8 have this issue. Newer IEs work as expected, though they still have async focus, but that's not an issue if we can prevent focus. |
Ok, that makes sense. I've made this change in 6fe06fa. Enter will only activate and not collapse. Space will toggle the focused tab, so if it's pending activation it will activate, if it's already active it will collapse, and if it's collapsed it will open. |
Added alt+page up/down in 3d735cf. |
Implemented, with work around for IE in 1f0ea5b. |
@hanshillen Can you confirm that everything is working as expected now? The only issue that should still exist is the announcement that JAWS makes about pressing space bar to activate. Is there any indication to the user that the tab has already been activated after JAWS announces the instructions? |
Hi Scott, it's mostly working as expected now, besides some JAWS oddities and some of the features (such as collapsible sections) not being communicated to screen reader users. Some remaining feedback:
|
That makes sense. I'll add it.
It doesn't seem to make sense to me for Space to toggle but not activate. Space means toggle, if you press it while navigating with the arrow keys and the tab has not already been activated then you're toggling it on. |
Fixed in 6b4457c. |
Perhaps we should remove the delayed activation now that we support ctrl+arrow keys. The main reason I wanted this was so that users could navigate quickly without needlessly activating lots of tabs in the process (especially useful for ajax tabs). Navigating with control isn't really discoverable though, so I don't have too strong of a feeling either way. However, I believe this would address some issues with JAWS announcements without resorting to hacks. Is that correct @hanshillen ? |
… tab as selected immediately.
@hanshillen and I just had a very long discussion about the delayed activation. We decided that the world sucks and nobody should be subject to implementing this stuff... There are three models:
Immediate activation has the benefit of being how most desktop tabs work. AT expect tabs to behave this way, and we get the most accessible solution for blind users. JAWS is able to announce that you can move focus from the tab to the panel because all state changes immediately. When the tab gains focus, it has Manual activation is a bit odd. It's very web-like (think about how tabs work now where you use the tab key to move between tabs and then press enter to activate, except that you use arrow keys instead of tab). Yahoo! Mail does this and Victor Tsaran thinks this is ok. They use Delayed activation is really nice for sighted keyboard users because they can quickly navigate across tabs without activating tabs in the process. This isn't useful for blind users because they can't possibly hear the tab labels before the delay finishes and the tab activates. Additionally screen readers get confused about the state of the tabs because at the time that the tab gains focus it still has We've decided to stay with delayed activation, but set |
I'm going to write tests for this, update the wiki and then squash this into master. Finally. |
This PR is for feedback and should not be merged to master. The default demo is modified for ease of testing. There's a mix of local, disabled, and ajax tabs.
Implementation:
Questions: