Skip to content

Commit 5750aed

Browse files
committed
Changed a11y_engine_commons variable name to a11yEngineCommons
2 parents 9ba67b7 + c277174 commit 5750aed

File tree

9 files changed

+67
-68
lines changed

9 files changed

+67
-68
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# a11y-engine-axe-core
2-
This is a fork of public Axe core repo:
3-
https://github.com/dequelabs/axe-core
42

3+
This is a fork of public Axe core repo:
4+
https://github.com/dequelabs/axe-core
55

66
## Pull latest changes from public axe-core repo
77

88
```
99
# cd into the repo
10-
cd a11y-engine-axe-core
10+
cd a11y-engine-axe-core
1111
1212
# Add public axe-core repo as remote public
1313
git remote add public [email protected]:dequelabs/axe-core.git
1414
1515
# Creates a merge commit
16-
git pull public master
16+
git pull public master
1717
1818
# push the changes to internal private repo
1919
git push origin master
2020
```
2121

22-
Axe-core readme: https://github.com/dequelabs/axe-core/blob/v4.9.0/README.md
22+
Axe-core readme: https://github.com/dequelabs/axe-core/blob/v4.9.0/README.md

lib/core/utils/performance-timer.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const performanceTimer = (() => {
3737
this.mark('mark_axe_end');
3838
this.measure('axe', 'mark_axe_start', 'mark_axe_end');
3939

40-
// this.logMeasures('axe');
40+
// this.logMeasures('axe');
4141
},
4242
/**
4343
* @member {Function} auditStart Starts an audit for a page or frame
@@ -52,7 +52,7 @@ const performanceTimer = (() => {
5252
this.mark('mark_audit_end');
5353
this.measure('audit_start_to_end', 'mark_audit_start', 'mark_audit_end');
5454
// log audit/rule measures
55-
// this.logMeasures();
55+
// this.logMeasures();
5656
},
5757
/**
5858
* @member {Function} mark Shims creating a new named time stamp, called a mark
@@ -74,15 +74,14 @@ const performanceTimer = (() => {
7474
*/
7575
measure(measureName, startMark, endMark, details = {}) {
7676
if (window.performance && window.performance.measure !== undefined) {
77-
if(Object.keys(details).length > 0) {
77+
if (Object.keys(details).length > 0) {
7878
const measureOpts = {
7979
detail: details,
8080
start: startMark,
8181
end: endMark
8282
};
8383
window.performance.measure(measureName, measureOpts);
84-
}
85-
else {
84+
} else {
8685
window.performance.measure(measureName, startMark, endMark);
8786
}
8887
}

lib/core/utils/pollyfills.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
- Array.prototype.find
77
*/
88
if (typeof Object.assign !== 'function') {
9-
(function() {
10-
Object.assign = function(target) {
9+
(function () {
10+
Object.assign = function (target) {
1111
if (target === undefined || target === null) {
1212
throw new TypeError('Cannot convert undefined or null to object');
1313
}
@@ -30,7 +30,7 @@ if (typeof Object.assign !== 'function') {
3030

3131
if (!Array.prototype.find) {
3232
Object.defineProperty(Array.prototype, 'find', {
33-
value: function(predicate) {
33+
value: function (predicate) {
3434
if (this === null) {
3535
throw new TypeError('Array.prototype.find called on null or undefined');
3636
}
@@ -55,7 +55,7 @@ if (!Array.prototype.find) {
5555

5656
if (!Array.prototype.findIndex) {
5757
Object.defineProperty(Array.prototype, 'findIndex', {
58-
value: function(predicate, thisArg) {
58+
value: function (predicate, thisArg) {
5959
if (this === null) {
6060
throw new TypeError('Array.prototype.find called on null or undefined');
6161
}
@@ -82,7 +82,7 @@ export function pollyfillElementsFromPoint() {
8282
if (document.elementsFromPoint) return document.elementsFromPoint;
8383
if (document.msElementsFromPoint) return document.msElementsFromPoint;
8484

85-
var usePointer = (function() {
85+
var usePointer = (function () {
8686
var element = document.createElement('x');
8787
element.style.cssText = 'pointer-events:auto';
8888
return element.style.pointerEvents === 'auto';
@@ -96,7 +96,7 @@ export function pollyfillElementsFromPoint() {
9696
? '* { pointer-events: all }'
9797
: '* { visibility: visible }';
9898

99-
return function(x, y) {
99+
return function (x, y) {
100100
var current, i, d;
101101
var elements = [];
102102
var previousPointerEvents = [];
@@ -153,7 +153,7 @@ if (typeof window.addEventListener === 'function') {
153153

154154
if (!Array.prototype.includes) {
155155
Object.defineProperty(Array.prototype, 'includes', {
156-
value: function(searchElement) {
156+
value: function (searchElement) {
157157
var O = Object(this);
158158
var len = parseInt(O.length, 10) || 0;
159159
if (len === 0) {
@@ -190,7 +190,7 @@ if (!Array.prototype.includes) {
190190
// Reference: http://es5.github.io/#x15.4.4.17
191191
if (!Array.prototype.some) {
192192
Object.defineProperty(Array.prototype, 'some', {
193-
value: function(fun) {
193+
value: function (fun) {
194194
if (this == null) {
195195
throw new TypeError('Array.prototype.some called on null or undefined');
196196
}
@@ -216,14 +216,14 @@ if (!Array.prototype.some) {
216216

217217
if (!Array.from) {
218218
Object.defineProperty(Array, 'from', {
219-
value: (function() {
219+
value: (function () {
220220
var toStr = Object.prototype.toString;
221-
var isCallable = function(fn) {
221+
var isCallable = function (fn) {
222222
return (
223223
typeof fn === 'function' || toStr.call(fn) === '[object Function]'
224224
);
225225
};
226-
var toInteger = function(value) {
226+
var toInteger = function (value) {
227227
var number = Number(value);
228228
if (isNaN(number)) {
229229
return 0;
@@ -234,7 +234,7 @@ if (!Array.from) {
234234
return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
235235
};
236236
var maxSafeInteger = Math.pow(2, 53) - 1;
237-
var toLength = function(value) {
237+
var toLength = function (value) {
238238
var len = toInteger(value);
239239
return Math.min(Math.max(len, 0), maxSafeInteger);
240240
};
@@ -307,7 +307,7 @@ if (!Array.from) {
307307
}
308308

309309
if (!String.prototype.includes) {
310-
String.prototype.includes = function(search, start) {
310+
String.prototype.includes = function (search, start) {
311311
if (typeof start !== 'number') {
312312
start = 0;
313313
}
@@ -329,7 +329,7 @@ if (!Array.prototype.flat) {
329329
return depth
330330
? Array.prototype.reduce.call(
331331
this,
332-
function(acc, cur) {
332+
function (acc, cur) {
333333
if (Array.isArray(cur)) {
334334
acc.push.apply(acc, flat.call(cur, depth - 1));
335335
} else {

test/act-mapping/karma.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = function(config) {
1+
module.exports = function (config) {
22
config.set({
33
basePath: '../../',
44
singleRun: true,

test/act-mapping/preprocessor.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ createActPreprocessor.$inject = ['logger'];
1212
function createActPreprocessor(logger) {
1313
var log = logger.create('preprocessor.act');
1414

15-
return function(actRuleJson, file, done) {
15+
return function (actRuleJson, file, done) {
1616
try {
1717
log.debug('Processing "%s".', file.originalPath);
1818
file.path = file.originalPath.replace(/\.json$/, '.js');
@@ -37,10 +37,10 @@ module.exports = {
3737
function applyTestCases(actRule) {
3838
actRule = Object.assign({}, actRule);
3939

40-
actRule.testcases = testcases.filter(function(testcase) {
40+
actRule.testcases = testcases.filter(function (testcase) {
4141
return testcase.ruleId === actRule.id;
4242
});
43-
actRule.testcases.forEach(function(testcase) {
43+
actRule.testcases.forEach(function (testcase) {
4444
var testcasePath = path.resolve(actRepoDir, testcase.relativePath);
4545
testcase.html = fs.readFileSync(testcasePath, 'utf-8');
4646
});

test/act-mapping/runner.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
(function() {
1+
(function () {
22
// this line is replaced with the test object in preprocessor.js
33
var actRule = {}; /*tests*/
44

5-
describe(actRule.title + ' (' + actRule.id + ')', function() {
5+
describe(actRule.title + ' (' + actRule.id + ')', function () {
66
var bodyContent;
7-
before(function() {
7+
before(function () {
88
var title = document.querySelector('title');
99
if (title) {
1010
document.head.removeChild(title);
@@ -13,16 +13,16 @@
1313
bodyContent = document.body.innerHTML;
1414
});
1515

16-
afterEach(function() {
16+
afterEach(function () {
1717
document.body.innerHTML = bodyContent;
1818
document.head.innerHTML = '';
1919
var htmlAttrs = Array.from(document.documentElement.attributes);
20-
htmlAttrs.forEach(function(attr) {
20+
htmlAttrs.forEach(function (attr) {
2121
document.documentElement.removeAttribute(attr.name);
2222
});
2323
});
2424

25-
actRule.testcases.forEach(function(testcase) {
25+
actRule.testcases.forEach(function (testcase) {
2626
runTestCase(testcase, {
2727
runOnly: actRule.axeRules
2828
});
@@ -31,11 +31,11 @@
3131

3232
function runTestCase(testcase, axeOptions) {
3333
var test = shouldSkip(testcase) ? xit : it;
34-
test(testcase.testcaseTitle, function(done) {
34+
test(testcase.testcaseTitle, function (done) {
3535
exampleSetup(testcase.html);
3636
axe
3737
.run(axeOptions)
38-
.then(function(result) {
38+
.then(function (result) {
3939
assertResultsCorrect(testcase, result);
4040
done();
4141
})
@@ -49,7 +49,7 @@
4949
document.head.innerHTML = newDoc.head.innerHTML;
5050
document.body.innerHTML += newDoc.body.innerHTML;
5151
var htmlAttrs = Array.from(newDoc.documentElement.attributes);
52-
htmlAttrs.forEach(function(attr) {
52+
htmlAttrs.forEach(function (attr) {
5353
document.documentElement.setAttribute(attr.name, attr.value);
5454
});
5555
}

test/aria-practices/run-server.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const getWebdriver = () => {
1010
return webdriver;
1111
};
1212

13-
const connectToChromeDriver = (port) => {
13+
const connectToChromeDriver = port => {
1414
let socket;
1515
return new Promise((resolve, reject) => {
1616
// Give up after 1s
@@ -31,13 +31,13 @@ const connectToChromeDriver = (port) => {
3131
);
3232

3333
// Fail on error
34-
socket.once('error', (err) => {
34+
socket.once('error', err => {
3535
clearTimeout(timer);
3636
socket.destroy();
3737
return reject(err);
3838
});
3939
});
4040
};
4141

42-
module.exports.getWebdriver = getWebdriver
43-
module.exports.connectToChromeDriver = connectToChromeDriver
42+
module.exports.getWebdriver = getWebdriver;
43+
module.exports.connectToChromeDriver = connectToChromeDriver;

0 commit comments

Comments
 (0)