diff --git a/CHANGELOG b/CHANGELOG index b43b1a6d70..7b9a669b1f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -50,3 +50,27 @@ v2.1.7: - Color contrast rule performance improvements using polyfilled elementsFromPoint - Add better support for implicit roles - DQElement supports xPath +v2.1.8: + date: 2017-02-21 + changes: + - Move from Snyk to Retire.js + - Make CI run test-fast task instead of parallel + - Add documentation on writing integration tests and rules + - Allow a larger list of languages for HTML-valid-lang rule + - Add support for [role=img] in image-alt rule + - Fix bug with innerHeight in get-background-color + - Improve dom.is-offscreen function + - Integrate optional performance timer + - Empty include defaults to document +v2.2.0: + date: 2017-04-24 + changes: + - Add configuration options for iframes: false, selectors: false, and elementRef: true + - Improve color-contrast rule for disabled elements + - Add webdriver task for testing mobile viewports + - Improve audio/video captioning rules + - Improve th-has-data-cells rule + - Expose incomplete reasons for color contrast rule as part of Needs Review + - Implement rule groupings as tags + - Allow building of axe in multiple languages + - Empty-heading rule has impact: moderate diff --git a/axe.d.ts b/axe.d.ts index c8786b9938..2e0e5aa50a 100644 --- a/axe.d.ts +++ b/axe.d.ts @@ -1,4 +1,4 @@ -// Type definitions for axe-core 2.1.7 +// Type definitions for axe-core 2.2.0 // Project: https://github.com/dequelabs/axe-core // Definitions by: Marcy Sutton @@ -122,7 +122,7 @@ declare module axe { * @param {Function} callback Optional The function to invoke when analysis is complete. * @returns {any} results If the callback was not defined, aXe will return a Promise instead. */ - function run(context?: ElementContext, options?: {runOnly?: RunOnly, rules?: Object}, callback?: (error: Error, results:AxeResults) => void): any + function run(context?: ElementContext, options?: {runOnly?: RunOnly, rules?: Object, iframes?: Boolean, elementRef?: Boolean, selectors?: Boolean}, callback?: (error: Error, results:AxeResults) => void): any /** * Starts analysis on the current document and its subframes @@ -132,7 +132,7 @@ declare module axe { * @param {Function} callback The function to invoke when analysis is complete. * @returns {Object} results The aXe results object */ - function a11yCheck(context: ElementContext, options: {runOnly?: RunOnly, rules?: Object}, callback: (results:AxeResults) => void): AxeResults + function a11yCheck(context: ElementContext, options: {runOnly?: RunOnly, rules?: Object, iframes?: Boolean, elementRef?: Boolean, selectors?: Boolean}, callback: (results:AxeResults) => void): AxeResults /** * Method for configuring the data format used by aXe. Helpful for adding new diff --git a/package.json b/package.json index c0b4a26815..c4918b8499 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "axe-core", "description": "Accessibility engine for automated Web UI testing", - "version": "2.1.8", + "version": "2.2.0", "license": "MPL-2.0", "contributors": [ { diff --git a/typings/axe-core/axe-core-tests.ts b/typings/axe-core/axe-core-tests.ts index 4d613954cd..e16c87f046 100644 --- a/typings/axe-core/axe-core-tests.ts +++ b/typings/axe-core/axe-core-tests.ts @@ -13,10 +13,13 @@ axe.run(context, {}, (error: Error, results: axe.AxeResults) => { console.log(results.violations.length); console.log(results.violations[0].nodes[0].failureSummary) }); - axe.run().then(function(done:any) { done(); }); +// additional configuration options +axe.run(context, {iframes: false, selectors: false, elementRef: false}, (error: Error, results: axe.AxeResults) => { + console.log(results.passes.length); +}); // axe.a11yCheck config axe.a11yCheck(context, {}, (results: axe.AxeResults) => { @@ -31,6 +34,10 @@ axe.a11yCheck({include: [['#id1'], ['#id2']]}, {}, (results: axe.AxeResults) => axe.a11yCheck({exclude: [$fixture[0]]}, {}, (results: axe.AxeResults) => { console.log(results) }) +// additional configuration options +axe.a11yCheck(context, {iframes: false, selectors: false, elementRef: false}, (results: axe.AxeResults) => { + console.log(results.passes.length); +}); var tagConfigRunOnly: axe.RunOnly = { type: 'tag', values: ['wcag2a']