diff --git a/axe.d.ts b/axe.d.ts index 675d9bd595..1887c03b69 100644 --- a/axe.d.ts +++ b/axe.d.ts @@ -50,8 +50,8 @@ declare namespace axe { type CrossFrameSelector = CrossTreeSelector[]; type ContextObject = { - include?: BaseSelector | Array; - exclude?: BaseSelector | Array; + include?: Node | BaseSelector | Array; + exclude?: Node | BaseSelector | Array; }; type RunCallback = (error: Error, results: AxeResults) => void; diff --git a/doc/API.md b/doc/API.md index 22dbd2ae95..a6dc0dd2fc 100644 --- a/doc/API.md +++ b/doc/API.md @@ -327,7 +327,7 @@ By default, `axe.run` will test the entire document. The context object is an op The include exclude object is a JSON object with two attributes: include and exclude. Either include or exclude is required. If only `exclude` is specified; include will default to the entire `document`. - A node, or -- An array of arrays of [CSS selectors](./developer-guide.md#supported-css-selectors) +- An array of Nodes or an array of arrays of [CSS selectors](./developer-guide.md#supported-css-selectors) - If the nested array contains a single string, that string is the CSS selector - If the nested array contains multiple strings - The last string is the final CSS selector diff --git a/typings/axe-core/axe-core-tests.ts b/typings/axe-core/axe-core-tests.ts index a572c6c095..32f3e67a72 100644 --- a/typings/axe-core/axe-core-tests.ts +++ b/typings/axe-core/axe-core-tests.ts @@ -1,7 +1,7 @@ import * as axe from '../../axe'; var context: any = document; -var $fixture: any = {}; +var $fixture = [document]; var options = { iframes: false, selectors: false, elementRef: false }; axe.run(context, {}, (error: Error, results: axe.AxeResults) => {