Skip to content

Commit

Permalink
Generated by TRAVIS-CI d367ea5
Browse files Browse the repository at this point in the history
Infrastructure: Add eslint rules from eslint:recommended config (pull #1207)

Perdiscussion in issue #1180, ad the eslint:recommended shareable config to eslint.
Then fix errors.

* chore: switch to eslint:recommended
* chore: eslint fix with new config
* fix: no-const-assign
* fix: no-empty
* fix: no-useless-escape
* fix: no-duplicate-case
* fix: no-constant-condition
* fix: no-unsafe-negation
* chore: ignore no-cond-assign
* fix: no-redeclare
* Option collides with built-in type
* fix: no-prototype-builtins
* chore: ignore currently failing rules
  • Loading branch information
michael-n-cooper committed Oct 22, 2019
1 parent 4a3b2f2 commit ef45a9f
Show file tree
Hide file tree
Showing 26 changed files with 321 additions and 307 deletions.
4 changes: 2 additions & 2 deletions examples/combobox/aria1.0pattern/js/listbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var Listbox = function (domNode, comboboxObj) {
msgPrefix = 'Listbox constructor argument domNode ';

// Check whether domNode is a DOM element
if (!domNode instanceof Element) {
if (!(domNode instanceof Element)) {
throw new TypeError(msgPrefix + 'is not a DOM Element.');
}

Expand Down Expand Up @@ -65,7 +65,7 @@ Listbox.prototype.init = function () {
optionElement = optionElements[i];

if (!optionElement.firstElementChild && optionElement.getAttribute('role') != 'separator') {
option = new Option(optionElement, this);
option = new ListboxOption(optionElement, this);
option.init();
this.allOptions.push(option);
}
Expand Down
10 changes: 5 additions & 5 deletions examples/combobox/aria1.0pattern/js/listboxOption.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This content is licensed according to the W3C Software License at
* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
*/
var Option = function (domNode, listboxObj) {
var ListboxOption = function (domNode, listboxObj) {

this.domNode = domNode;
this.listbox = listboxObj;
Expand All @@ -11,7 +11,7 @@ var Option = function (domNode, listboxObj) {

};

Option.prototype.init = function () {
ListboxOption.prototype.init = function () {

if (!this.domNode.getAttribute('role')) {
this.domNode.setAttribute('role', 'option');
Expand All @@ -25,18 +25,18 @@ Option.prototype.init = function () {

/* EVENT HANDLERS */

Option.prototype.handleClick = function (event) {
ListboxOption.prototype.handleClick = function (event) {
this.listbox.setOption(this);
this.listbox.close(true);
};

Option.prototype.handleMouseover = function (event) {
ListboxOption.prototype.handleMouseover = function (event) {
this.listbox.hasHover = true;
this.listbox.open();

};

Option.prototype.handleMouseout = function (event) {
ListboxOption.prototype.handleMouseout = function (event) {
this.listbox.hasHover = false;
setTimeout(this.listbox.close.bind(this.listbox, false), 300);
};
1 change: 1 addition & 0 deletions examples/dialog-modal/js/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ aria.Utils = aria.Utils || {};
element.focus();
}
catch (e) {
// continue regardless of error
}
aria.Utils.IgnoreUtilFocusChanges = false;
return (document.activeElement === element);
Expand Down
Loading

0 comments on commit ef45a9f

Please sign in to comment.