-
Notifications
You must be signed in to change notification settings - Fork 1k
Makes tree accessible #1984
Makes tree accessible #1984
Conversation
grunt/tasks/test.js
Outdated
@@ -3,6 +3,10 @@ module.exports = function test (grunt) { | |||
grunt.registerTask('test', 'run jshint, qunit source w/ coverage, and validate HTML', | |||
['jshint', 'connect:testServer', 'qunit:noMoment', 'qunit:globals', 'test-dist', 'htmllint']); | |||
|
|||
grunt.registerTask('unittest', 'run jshint, qunit source w/ coverage, and validate HTML', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why i don't see unittest
being used anywhere
js/tree.js
Outdated
@@ -32,46 +34,57 @@ | |||
// TREE CONSTRUCTOR AND PROTOTYPE | |||
|
|||
var Tree = function Tree(element, options) { | |||
this.$element = $(element); | |||
var $element = $(element); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only see $element
used once at https://github.com/ExactTarget/fuelux/pull/1984/files?#diff-e5768895bd9d9f525527077130cf278bR70
It could be replaced with
this.$element.on('focus', function setFocusOnTab () {
var $tree = $(this);
focusIn($tree, $tree);
});
making this assignment unnecessary.
372b0eb
|
|
Working through @interactivellama's feedback now.
|
e50acc2
to
ab2241f
Compare
Note that the tree markup changes slightly with this PR adding aria-* attributes and tabindex to many of the nodes in tree. It's a non-breaking change. |
…on for adding a bunch more
…sed element on focusIn
…ey pressed over 'load more'. Fixes bug where hidden elements block keyboard navigation
…ed for selecting/deselection according to spec. Adam might know a bit more about the nuance here and recommend making spacebar only do a subset of what enter does...
…one before triggering listeners
Updates comment for `unittest` task for accuracy
…o hbs tree template
…that shift+tab will work
…uld-be-accessible
5c09550
to
956e4d4
Compare
fixes #1964