Closed
Description
In addition to a query selector or HTML DOM node, the axe context argument can also include an "include/exclude" pojo. The a11yAudit helper fails to account for this argument format and assumes that the object is the options argument.
For example, the following invocation will execute on the entire document instead of the assigned scope, and will fail to apply the axe configurations set in environment.js:
await a11yAuditIf({
include: [['.col-thread']],
exclude: [
['[data-control-name="select_gif"]']
]
});
The current workaround is to assign null
as the second argument to bypass the internal formatting check:
await a11yAuditIf({
include: [['.col-thread']],
exclude: [
['[data-control-name="select_gif"]']
]
}, null);
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
[-]a11yAudit Fails to account for include/exclude rules config[/-][+]a11yAudit fails to account for include/exclude context parameter[/+]drewlee commentedon Apr 23, 2019
Source of the issue:
ember-a11y-testing/addon-test-support/audit.js
Line 60 in 256d03e
Fixes ember-a11y#124. Allows a11yAudit to account for axe inlude/excl…
Fixes failing test for ember-a11y#124.
drewlee commentedon Sep 6, 2019
Fix included in PR #132
Merge pull request #132 from drewlee/master