Skip to content

Commit ae4aa7f

Browse files
author
Marcy Sutton
committed
Merge remote-tracking branch 'origin/develop'
2 parents 604907d + f758dd5 commit ae4aa7f

File tree

138 files changed

+2337
-1271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+2337
-1271
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
<a name="3.0.0-beta.1"></a>
6+
# [3.0.0-beta.1](https://github.com/dequelabs/axe-core/compare/v3.0.0-alpha.9...v3.0.0-beta.1) (2018-02-19)
7+
8+
9+
### Bug Fixes
10+
11+
* **audio-caption:** Change tag wcag122 to wcag121 [#686](https://github.com/dequelabs/axe-core/issues/686) ([#721](https://github.com/dequelabs/axe-core/issues/721)) ([9c7b9f1](https://github.com/dequelabs/axe-core/commit/9c7b9f1))
12+
* **empty-heading:** Skip headings with the role changed [#645](https://github.com/dequelabs/axe-core/issues/645) ([#722](https://github.com/dequelabs/axe-core/issues/722)) ([80ef961](https://github.com/dequelabs/axe-core/commit/80ef961))
13+
* **image-alt:** Exclude svg[role="img"] elements ([#683](https://github.com/dequelabs/axe-core/issues/683)) ([0fe74d8](https://github.com/dequelabs/axe-core/commit/0fe74d8))
14+
* **label:** Prevent label rule from crashing on input without type [#678](https://github.com/dequelabs/axe-core/issues/678) ([#730](https://github.com/dequelabs/axe-core/issues/730)) ([4498680](https://github.com/dequelabs/axe-core/commit/4498680))
15+
* **perf:** improve select performance fixes [#702](https://github.com/dequelabs/axe-core/issues/702) ([3274919](https://github.com/dequelabs/axe-core/commit/3274919))
16+
* **perf:** memoize axe.utils.select ([c9cd122](https://github.com/dequelabs/axe-core/commit/c9cd122))
17+
* **perf:** normalize all selectors for better cache utilization ([189c165](https://github.com/dequelabs/axe-core/commit/189c165))
18+
* **perf:** remove need for node sorting from select completely ([7677a6a](https://github.com/dequelabs/axe-core/commit/7677a6a))
19+
* **performance:** significantly improve the performance of the dom.findUp utility fixes [#696](https://github.com/dequelabs/axe-core/issues/696) ([9197e03](https://github.com/dequelabs/axe-core/commit/9197e03))
20+
* add shadow dom coverage to all checks ([0e48413](https://github.com/dequelabs/axe-core/commit/0e48413)), closes [#690](https://github.com/dequelabs/axe-core/issues/690)
21+
* bug-705: cleanupPlugins() should not throw exception when no arguments are provided ([#709](https://github.com/dequelabs/axe-core/issues/709)) ([fb1d2f7](https://github.com/dequelabs/axe-core/commit/fb1d2f7))
22+
* Remove axe.a11yCheck() ([88d039f](https://github.com/dequelabs/axe-core/commit/88d039f))
23+
* use virtual methods where applicable ([6ddc4e5](https://github.com/dequelabs/axe-core/commit/6ddc4e5))
24+
* **type-checking:** Improve typescript axe.run call signature ([#707](https://github.com/dequelabs/axe-core/issues/707)) ([de45ee3](https://github.com/dequelabs/axe-core/commit/de45ee3))
25+
26+
27+
### Performance Improvements
28+
29+
* Add performance metrics in Rule.runChecks ([#701](https://github.com/dequelabs/axe-core/issues/701)) ([27fdc2f](https://github.com/dequelabs/axe-core/commit/27fdc2f))
30+
31+
32+
533
<a name="3.0.0-alpha.9"></a>
634
# [3.0.0-alpha.9](https://github.com/dequelabs/axe-core/compare/v3.0.0-alpha.8...v3.0.0-alpha.9) (2018-01-18)
735

CONTRIBUTING.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,12 @@ Installing aXe to run accessibility tests in your TypeScript project should be a
136136
import * as axe from 'axe-core';
137137

138138
describe('Module', () => {
139-
it('should have no accessibility violations', () => {
140-
axe.a11yCheck(compiledFixture, {}, (results) => {
141-
expect(results.violations.length).toBe(0);
142-
});
139+
it('should have no accessibility violations', (done) => {
140+
axe.run(compiledFixture)
141+
.then((results) => {
142+
expect(results.violations.length).toBe(0);
143+
done()
144+
}, done);
143145
});
144146
});
145147
```

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
The Accessibility Engine for automated testing of HTML-based user interfaces. Drop the aXe on your accessibility defects!
1212

13+
Thanks for helping us to make axe-core the most widely used HTML accessibility testing library in the galaxy! Share your axe-core story using #axecoresquad or by submitting it [here](https://accessibility.deque.com/axe-core-stories) to get a sweet T-shirt.
14+
1315
## Philosophy
1416

1517
We believe that automated testing has an important role to play in achieving digital equality and that in order to do that, it must achieve mainstream adoption by professional web developers. That means that the tests must inspire trust, must be fast, must work everywhere and must be available everywhere.
@@ -89,6 +91,8 @@ This will create a new build for aXe, called `axe.<lang>.js` and `axe.<lang>.min
8991

9092
To create a new translation for aXe, start by running `grunt translate --lang=<langcode>`. This will create a json file fin the `./locales` directory, with the default English text in it for you to translate. We welcome any localization for axe-core. For details on how to contribute, see the Contributing section below.
9193

94+
To update existing translation file, re-run `grunt translate --lang=<langcode>`. This will add new messages used in English and remove messages which were not used in English.
95+
9296
## Contributing
9397

9498
Read the [Proposing Axe-core Rules guide ](./doc/rule-proposal.md)

axe.d.ts

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for axe-core 3.0.0-alpha.9
1+
// Type definitions for axe-core 3.0.0-beta.1
22
// Project: https://github.com/dequelabs/axe-core
33
// Definitions by: Marcy Sutton <https://github.com/marcysutton>
44

@@ -12,6 +12,8 @@ declare module axe {
1212

1313
type RunOnlyType = "rule" | "rules" | "tag" | "tags";
1414

15+
type RunCallback = (error: Error, results:AxeResults) => void;
16+
1517
interface ElementContext {
1618
node?: Object,
1719
selector?: string,
@@ -26,6 +28,13 @@ declare module axe {
2628
}
2729
values?: TagValue[]
2830
}
31+
interface RunOptions {
32+
runOnly?: RunOnly,
33+
rules?: Object,
34+
iframes?: Boolean,
35+
elementRef?: Boolean,
36+
selectors?: Boolean
37+
}
2938
interface AxeResults {
3039
url: string,
3140
timestamp: string,
@@ -117,22 +126,18 @@ declare module axe {
117126
/**
118127
* Runs a number of rules against the provided HTML page and returns the resulting issue list
119128
*
120-
* @param {Object} context Optional The `Context` specification object @see Context
121-
* @param {Array} options Optional Options passed into rules or checks, temporarily modifying them.
122-
* @param {Function} callback Optional The function to invoke when analysis is complete.
123-
* @returns {any} results If the callback was not defined, aXe will return a Promise instead.
124-
*/
125-
function run(context?: ElementContext, options?: {runOnly?: RunOnly, rules?: Object, iframes?: Boolean, elementRef?: Boolean, selectors?: Boolean}, callback?: (error: Error, results:AxeResults) => void): any
126-
127-
/**
128-
* Starts analysis on the current document and its subframes
129-
*
130-
* @param {Object} context The `Context` specification object @see Context
131-
* @param {Array} options Options passed into rules or checks, temporarily modifyint them.
132-
* @param {Function} callback The function to invoke when analysis is complete.
133-
* @returns {Object} results The aXe results object
129+
* @param {ElementContext} context Optional The `Context` specification object @see Context
130+
* @param {RunOptions} options Optional Options passed into rules or checks, temporarily modifying them.
131+
* @param {RunCallback} callback Optional The function to invoke when analysis is complete.
132+
* @returns {Promise<AxeResults>|void} If the callback was not defined, aXe will return a Promise.
134133
*/
135-
function a11yCheck(context: ElementContext, options: {runOnly?: RunOnly, rules?: Object, iframes?: Boolean, elementRef?: Boolean, selectors?: Boolean}, callback: (results:AxeResults) => void): AxeResults
134+
function run(context: ElementContext): Promise<AxeResults>
135+
function run(options: RunOptions): Promise<AxeResults>
136+
function run(callback: (error: Error, results:AxeResults) => void): void
137+
function run(context: ElementContext, callback: RunCallback): void
138+
function run(options: RunOptions, callback: RunCallback): void
139+
function run(context: ElementContext, options: RunOptions): Promise<AxeResults>
140+
function run(context: ElementContext, options: RunOptions, callback: RunCallback): void
136141

137142
/**
138143
* Method for configuring the data format used by aXe. Helpful for adding new

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "axe-core",
3-
"version": "3.0.0-alpha.9",
3+
"version": "3.0.0-beta.1",
44
"contributors": [
55
{
66
"name": "David Sturley",

build/tasks/add-locale.js

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,33 @@
11
/*jshint node: true */
22
'use strict';
3+
var clone = require('clone');
34
var buildManual = require('../build-manual');
45

56
module.exports = function (grunt) {
7+
function mergeMessages (newMessages, oldMessages) {
8+
Object.keys(newMessages).forEach(function (key) {
9+
if (!oldMessages.hasOwnProperty(key)) {
10+
return;
11+
}
12+
13+
var newValue = newMessages[key];
14+
var oldValue = oldMessages[key];
15+
16+
if (typeof newValue === 'object') {
17+
// the message format might be changed, ignore old message
18+
if (typeof oldValue !== 'object') {
19+
return;
20+
}
21+
22+
newMessages[key] = mergeMessages(clone(newValue), oldValue);
23+
} else {
24+
newMessages[key] = clone(oldValue);
25+
}
26+
});
27+
28+
return newMessages;
29+
}
30+
631
grunt.registerMultiTask('add-locale',
732
'Task for localizing messages in rules and checks',
833
function () {
@@ -43,9 +68,18 @@ module.exports = function (grunt) {
4368
}, {})
4469
};
4570

71+
// update locale file if exists
72+
var localeFile = './locales/' + options.lang + '.json';
73+
if (grunt.file.exists(localeFile)) {
74+
var oldMessages = grunt.file.readJSON(localeFile);
75+
76+
// mergeMessages mutates out
77+
mergeMessages(out, oldMessages);
78+
}
79+
4680
grunt.file.write(file.dest, JSON.stringify(out, null, ' '));
4781
console.log('created file at', file.dest);
4882
});
4983
});
5084
});
51-
};
85+
};

circle.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1-
machine:
2-
node:
3-
version: v6.1.0
1+
version: 2
2+
jobs:
3+
build:
4+
docker:
5+
- image: circleci/node:6.12.3-browsers
6+
steps:
7+
- checkout
8+
- run:
9+
name: install-npm
10+
command: npm install
11+
- run:
12+
name: test
13+
command: npm test

doc/.github/ISSUE_TEMPLATE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!-- Thanks for reporting an issue to axe-core. Please provide all necessary info to reproduce the issue. Without adequate details, your issue may be closed without investigation.
2+
3+
If you’re reporting a bug, include a description of the issue and a page or code snippet where it can be reproduced. Please make sure you have tested this with the latest version of axe-core. When proposing a new rule, please use our rule template: https://github.com/dequelabs/axe-core/blob/develop/doc/rule-proposal.md
4+
5+
Describe what the desired behavior would be, and how it applies to axe-core's "Accessibility Supported" policy: https://github.com/dequelabs/axe-core/blob/develop/doc/accessibility-supported.md
6+
-->
7+
8+
- Link to live demo:
9+
10+
<pre><code>
11+
axe-core version: X.Y.Z
12+
axe-webdriver, extension or other integration version: X.Y.Z
13+
14+
Browser and Assistive Technology versions
15+
16+
For Tooling issues:
17+
- Node version: XX <!-- run `node --version` -->
18+
- Platform: <!-- Mac, Linux, Windows -->
19+
</code></pre>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## PR Checklist
2+
Please check if your PR fulfills the following requirements:
3+
4+
- [ ] The commit message(s) follow our guidelines: https://github.com/dequelabs/axe-core/blob/develop/doc/code-submission-guidelines.md#git-commits
5+
- [ ] Changes to rules and checks appropriately support [Shadow DOM](https://github.com/dequelabs/axe-core/blob/develop/doc/developer-guide.md)
6+
- [ ] Changes have been tested in [major browsers and Assistive Technologies](https://github.com/dequelabs/axe-core/blob/develop/doc/accessibility-supported.md#accessibility-supported)
7+
- [ ] Tests for the changes have been added (for bug fixes / features)
8+
- [ ] Docs have been added / updated (for bug fixes / features)
9+
10+
## Description of the changes
11+
- Github issue:
12+
13+
14+
## Does this PR introduce a breaking change?
15+
```
16+
[ ] Yes
17+
[ ] No
18+
```
19+
20+
21+
## Other information

0 commit comments

Comments
 (0)