Skip to content

Commit

Permalink
Add targeted rule-disabling
Browse files Browse the repository at this point in the history
This turns off one rule for the job definition test, as the
CodeMirror component is failing:
https://dequeuniversity.com/rules/axe/3.5/scrollable-region-focusable
  • Loading branch information
backspace committed Jul 23, 2020
1 parent cdbab70 commit 4095504
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ui/tests/acceptance/job-definition-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module('Acceptance | job definition', function(hooks) {
});

test('it passes an accessibility audit', async function(assert) {
await a11yAudit();
await a11yAudit('scrollable-region-focusable');
assert.ok(true, 'a11y audit passes');
});

Expand Down
25 changes: 12 additions & 13 deletions ui/tests/helpers/a11y-audit.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import a11yAudit from 'ember-a11y-testing/test-support/audit';

export default async function defaultA11yAudit() {
await a11yAudit({
rules: {
'color-contrast': {
enabled: false
},
'heading-order': {
enabled: false
},
'scrollable-region-focusable': {
enabled: false
},
export default async function defaultA11yAudit(...overriddenRules) {
const rules = {
'color-contrast': {
enabled: false
},
'heading-order': {
enabled: false
}
});
};

overriddenRules.forEach(rule => rules[rule] = { enabled: false });

await a11yAudit({rules});
}

0 comments on commit 4095504

Please sign in to comment.