Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
(GH1994) merges latest from master
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher McCulloh committed Jun 28, 2017
2 parents 7f6730a + bb6c760 commit 9f323ff
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 31 deletions.
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ <h2>Checkboxes</h2>
<div class="thin-box">
<section id="checkboxes-toggling">
<div class="checkbox">
<label class="checkbox-custom" data-initialize="checkbox" data-ignore-visibility-check=true id="myCustomTogglingCheckbox1">
<input type="checkbox" class="sr-only" data-toggle=".checkboxToggle" style="visibility: hidden;" />
<label class="checkbox-custom" data-initialize="checkbox" id="myCustomTogglingCheckbox1">
<input type="checkbox" class="sr-only" data-toggle=".checkboxToggle" />
<span class="checkbox-label">Custom checkbox toggles by class</span>
</label>
</div>
<div class="checkbox">
<label class="checkbox-custom" data-initialize="checkbox" id="myCustomTogglingCheckbox2">
<input type="checkbox" class="sr-only" data-toggle="#checkboxToggle" style="visibility: hidden;" />
<input type="checkbox" class="sr-only" data-toggle="#checkboxToggle" />
<span class="checkbox-label">Custom checkbox toggles by id</span>
</label>
</div>
Expand Down Expand Up @@ -654,14 +654,14 @@ <h2>Radio Buttons</h2>
<div class="thin-box">
<!--Block-level Radios-->
<div class="radio">
<label class="radio-custom" data-initialize="radio" data-ignore-visibility-check=true id="myCustomRadio1">
<input class="sr-only" name="radio1" type="radio" value="" id="radio1" style="visibility: hidden;"/>
<label class="radio-custom" data-initialize="radio" id="myCustomRadio1">
<input class="sr-only" name="radio1" type="radio" value="" id="radio1" />
<span class="radio-label">Custom radio unchecked on page load</span>
</label>
</div>
<div class="radio">
<label class="radio-custom" data-initialize="radio" id="myCustomRadio2">
<input checked="checked" class="checked sr-only" name="radio1" type="radio" value="" id="radio2" style="visibility: hidden;"/>
<input checked="checked" class="checked sr-only" name="radio1" type="radio" value="" id="radio2" />
<span class="radio-label">Custom radio checked on page load</span>
</label>
</div>
Expand Down
3 changes: 0 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ define(function (require) {
window.console.log.apply(console, args);
}
};
// if (window.console && window.console.clear) {
// window.console.clear();
// }

// programmatically injecting this is so much easier than writing the html by hand 376 times...
$('h1[id], h2[id], h3[id], h4[id], h5[id], h6[id], dt[id], section[id]').each(function (i) {
Expand Down
6 changes: 3 additions & 3 deletions js/pillbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@
factory(jQuery);
}
}(function PillboxWrapper ($) {
// -- END UMD WRAPPER PREFACE --

// -- BEGIN MODULE CODE HERE --
if (!$.fn.dropdownautoflip) {
throw new Error('Fuel UX pillbox control requires dropdown-autoflip.');
}

if (!$.fn.utilities) {
throw new Error('Fuel UX pillbox control requires FuelUX utilities.');
}
// -- END UMD WRAPPER PREFACE --

// -- BEGIN MODULE CODE HERE --

var old = $.fn.pillbox;

Expand Down
7 changes: 4 additions & 3 deletions js/scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@
factory(jQuery);
}
}(function SchedulerWrapper ($) {
// -- END UMD WRAPPER PREFACE --

// -- BEGIN MODULE CODE HERE --
if (!$.fn.combobox || !$.fn.datepicker || !$.fn.radio || !$.fn.selectlist || !$.fn.spinbox) {
throw new Error('Fuel UX scheduler control requires combobox, datepicker, radio, selectlist, and spinbox.');
}

// -- END UMD WRAPPER PREFACE --

// -- BEGIN MODULE CODE HERE --

var old = $.fn.scheduler;

// SCHEDULER CONSTRUCTOR AND PROTOTYPE
Expand Down
1 change: 1 addition & 0 deletions test/SKIPPED_TESTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
When the tree accessibility work was originally done, time did not allow for fully baking all of the unit tests. All of the reasonable test cases that I could think of were defined so that the intended functionality could be documented. The idea being that if the tree was ever touched again (which is actually a big question mark given the state of Fuel UX) any functionality affected by the re-work should at that time (if reasonable) be covered by fully-baked unit tests.
2 changes: 1 addition & 1 deletion test/tree-tests/down-key-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ define(function keyboardNavigationModuleFactory (require) {
});

QUnit.skip('when focus is on last focusable child of parent, moves focus out of parent onto first focusable sibling of parent', function loadTree (assert) {

// Skipped due to time constraints. If you touch this part of the tree, please complete this test
});

QUnit.skip('when focus is on open branch, moves focus into open branch onto first focusable child', function respondsToKeyboardInput (assert) {
Expand Down
2 changes: 1 addition & 1 deletion test/tree-tests/end-key-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ define(function keyboardNavigationModuleFactory (require) {
return function endKeyModule (QUnit) {
QUnit.module( 'should respond to end key', {}, function testEndKeyPresses () {
QUnit.skip('moves focus to last selectable node in tree', function loadTree (assert) {

// Skipped due to time constraints. If you touch this part of the tree, please complete this test
});
});
};
Expand Down
6 changes: 2 additions & 4 deletions test/tree-tests/home-key-module.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
define(function keyboardNavigationModuleFactory (require) {
var $ = require('jquery');

define(function keyboardNavigationModuleFactory () {
return function homeKeyModule (QUnit) {
QUnit.module( 'should respond to home key', {}, function testHomeKeyPresses () {
QUnit.skip('moves focus to first selectable node in tree', function loadTree (assert) {

// Skipped due to time constraints. If you touch this part of the tree, please complete this test
});
});
};
Expand Down
2 changes: 2 additions & 0 deletions test/tree-tests/left-key-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ define(function keyboardNavigationModuleFactory (require) {
});

QUnit.skip('on child node when branch is closed', function loadTree (assert) {
// The following doesn't actually work due to issues with browsers and focus.
// Gave up due to time constraints. If you touch this part of the tree, please complete this test
assert.expect( 4 );
var $tree = this.$tree;
var self = this;
Expand Down
4 changes: 2 additions & 2 deletions test/tree-tests/right-key-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ define(function keyboardNavigationModuleFactory (require) {
return function rightKeyModule (QUnit) {
QUnit.module( 'should respond to right key', {}, function testRightKeyPresses () {
QUnit.skip('when branch is closed, discloses branch', function loadTree (assert) {

// Skipped due to time constraints. If you touch this part of the tree, please complete this test
});

QUnit.skip('when branch is disclosed, focuses into branch', function respondsToKeyboardInput (assert) {

// Skipped due to time constraints. If you touch this part of the tree, please complete this test
});
});
};
Expand Down
6 changes: 3 additions & 3 deletions test/tree-tests/space-key-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ define(function keyboardNavigationModuleFactory (require) {
return function spaceKeyModule (QUnit) {
QUnit.module( 'should respond to space key', {}, function testSpaceKeyPresses () {
QUnit.skip('when focus is on selectable node, select node', function loadTree (assert) {

// Skipped due to time constraints. If you touch this part of the tree, please complete this test
});

QUnit.skip('when focus is on non-selectable, disclose-able node, toggles node', function loadTree (assert) {

// Skipped due to time constraints. If you touch this part of the tree, please complete this test
});

QUnit.skip('when focus is on non-selectable, non-disclose-able node, clicks on node (this is probably "loading...")', function respondsToKeyboardInput (assert) {

// Skipped due to time constraints. If you touch this part of the tree, please complete this test
});
});
};
Expand Down
8 changes: 4 additions & 4 deletions test/tree-tests/tab-indexes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ define(function Module (require) {
return function tabIndexModule (QUnit) {
QUnit.module( 'tab indexes', {}, function testTabIndexes () {
QUnit.skip('are all set to -1 on tree load', function loadTree (assert) {

// Skipped due to time constraints. If you touch this part of the tree, please complete this test
});
QUnit.skip('are set to 1 for selected items', function loadTree (assert) {

// Skipped due to time constraints. If you touch this part of the tree, please complete this test
});
QUnit.skip('are all set to -1 on new item selection', function loadTree (assert) {

// Skipped due to time constraints. If you touch this part of the tree, please complete this test
});
QUnit.skip('root tree element is set to -1 on item selection', function loadTree (assert) {

// Skipped due to time constraints. If you touch this part of the tree, please complete this test
});
});
};
Expand Down
2 changes: 1 addition & 1 deletion test/tree-tests/up-key-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ define(function keyboardNavigationModuleFactory (require) {
});

QUnit.skip('when focus is below open sibling, moves focus into last focusable child of sibling', function loadTree (assert) {

// Skipped due to time constraints. If you touch this part of the tree, please complete this test
});

QUnit.skip('when focus is in first child of open branch, moves focus onto parent', function respondsToKeyboardInput (assert) {
Expand Down

0 comments on commit 9f323ff

Please sign in to comment.