ally.js
ally.js copied to clipboard
Replace jQuery UI's focusable and tabbable implementations?
To give a brief Twitter discussion a more formal home: jQuery UI implements tabbable and focusable as jQuery selectors. We've recently improved the implementation to deal with visibility:visible inside visibility:hidden elements, but there's still lots that we're missing (okay for jQuery UI's needs, so far).
To be able to replace our implementations, we would need to be able to import the relevant ally.js modules as an external dependency, then wrap them as jQuery selectors.
If we do that, we probably should also merge our tests, and remove the one's on jQuery UI's end: https://github.com/jquery/jquery-ui/blob/master/tests/unit/core/selector.js
/cc @scottgonzalez
I like the idea. However I have to emphasize that ally.js supports IE10+. If jQueryUI has a similar lower boundary, this isn't a problem, but if we need to support IE8, I expect a whole lot of work ahead of us (at least regarding testing).
Current development is going on in the master branch for 1.0.0, github shows the last version 0.0.7 in the stable branch. There are only a few things left for properly releasing 1.0.0, of which the bulk constitutes website and documentation. After fixing the remaining issues, I'll prepare 1.0.0-beta1 (still hoping to get this done early October).
ally.js is architected in a modular fashion, allowing jQueryUI to only use the relevant focusable/tabbable features, without importing any of the other stuff. The document what does focusable mean gives an overview of the modules most relevant to your use case. Modules are available in ES6 (source), AMD and CommonJS.
I guess the first step would be to make ui/focusable run is/focusable, and ui/tabbable run is/focusable and is/tabbable.
Since I have more goals for ally.js, I was considering providing a separate accessibility.jquery.js plugin, that makes this stuff available independent of jQueryUI. Is that something worth considering for a second step?
As the compatibility tables are not hosted on github yet, here are some snapshots:
- focusable elements
- focus redirecting elements
- jQuery UI compat
- ally.js "strict" (using
TreeWalker) - ally.js "quick" (using
querySelectorAll())
The browser support is a problem, since the next jQuery UI release still supports IE8. Maybe for 1.13+ we can make the cut to IE10.
Otherwise this still sounds promising. Once you've release the 1.0.0-beta1 we could give it a try.
The browser support is a problem, since the next jQuery UI release still supports IE8. Maybe for 1.13+ we can make the cut to IE10.
Do you have a fuzzy date for 1.13 in mind?
If we limit the scope to focusable and tabbable, I assume there's not too much refactoring necessary (assuming jQueryUI requires ES5-shim already). It'll be the compatibility test that needs some love, I fear. Nothing that can't be done - it's just a matter of priorities.
Otherwise this still sounds promising. Once you've release the
1.0.0-beta1we could give it a try.
I'll ping you here once it landed.
No date, and no es5-shim :disappointed_relieved:
no es5-shim :disappointed_relieved:
So we would have to compile this down to ES3? Oh boy…
With 1.13 considering IE10 as the lower end of the spectrum, ES5 is going to become the required base as well, I assume?
Yes, when we drop IE 8 (whether we go to IE 9 or IE 10), we'll be able to use ES5 features.
I said I'd ping you here when 1.0.0 was ready - and it is! all the docs are live at allyjs.io, the library is available on CDNs and npm (see getting started).
In #57 I've started collecting thoughts on how to expose ally in jQuery. The proposed jQuery plugin would also cover the utilities needed by jQuery UI.
I think we should start by creating that jQuery plugin first and then explore if and how we might be able to support older IEs.
We can certainly try out the integration soon, but we can't land it until master is ready for 1.13 code.
We can certainly try out the integration soon, but we can't land it until master is ready for 1.13 code.
Waiting for a later release is certainly your prerogative. That's part of the reason I started thinking about extracting the jQuery integration into a separate module (that could then be used by jQueryUI) to allow developers to upgrade earlier, if the can/want.
If @jzaefferer is in Cologne over the weekend, I'll try to fly by and try to get some questions on procedure sorted :)
Here's a quick recap of what @jzaefferer and I talked about:
- jQuery UI 1.12 is currently in development and will retain compatibility with IE8 - ally.js is not going to be integrated.
- jQuery UI 1.13 will drop support for IE8 but retain IE9 support. ally.js needs to become IE9 compatible.
- Because 1.13 is a long way out we'll start with a separte jQuery-ally-binding plugin (that may be used by jQuery UI for preliminary tests). We decided to provide a plugin file that expected
jQueryandallybeing loaded separately. We're also interested in providing modules that would include ally code. - Apparently the warnings and errors produced by ally.js in Chrome (#68) pose a major problem to the jQuery UI userbase. We have not discussed ways to convince Chrome to "shut up"…
Since Microsoft is dropping support for IE 8, 9 and 10 in January 2016 (pretty soon), we may adjust our browser support in jQuery UI accordingly (still need to discuss that with the team). You should not bother with IE9 for now.
You should not bother with IE9 for now.
too late, #77 already landed. But I'll hold off on doing crazy things to support IE8. Thx for the update, tho!
Oh well, that also works. Feel free to also ping me on PRs, especially if related to features we'd use in jQuery UI.