Skip to content

Commit

Permalink
Update a11y tests
Browse files Browse the repository at this point in the history
Update a11y tests
  • Loading branch information
JD Huntington authored May 30, 2019
1 parent ace30c2 commit 1dbb8a9
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,46 @@ Array [
]
`;

exports[`checks accessibility of Button (Button.CustomSplit.Example) 1`] = `
Array [
Object {
"level": "error",
"locations": Array [
Object {
"annotations": Array [
Object {
"snippet": Object {
"text": "<div data-automation-id=\\"test\\" aria-roledescription=\\"split button\\" data-is-focusable=\\"true\\" role=\\"button\\" aria-haspopup=\\"true\\" aria-expanded=\\"false\\" class=\\"css-10\\" tabindex=\\"0\\">",
},
},
],
"fullyQualifiedLogicalName": ".css-10",
"physicalLocation": Object {
"fileLocation": Object {
"uri": "about:blank",
},
},
},
],
"message": Object {
"richText": "Fix all of the following:
- ARIA attribute is not widely supported in screen readers and assistive technologies: aria-roledescription",
"text": "Fix all of the following: ARIA attribute is not widely supported in screen readers and assistive technologies: aria-roledescription.",
},
"partialFingerprints": Object {
"fullyQualifiedLogicalName": ".css-10",
"ruleId": "aria-allowed-attr",
},
"properties": Object {
"tags": Array [
"Accessibility",
],
},
"ruleId": "aria-allowed-attr",
},
]
`;

exports[`checks accessibility of Button (Button.Default.Example) 1`] = `Array []`;

exports[`checks accessibility of Button (Button.Icon.Example) 1`] = `Array []`;
Expand Down Expand Up @@ -172,11 +212,11 @@ Array [
"annotations": Array [
Object {
"snippet": Object {
"text": "<div data-automation-id=\\"test\\" aria-roledescription=\\"split button\\" aria-disabled=\\"true\\" data-is-focusable=\\"true\\" role=\\"button\\" aria-haspopup=\\"true\\" aria-expanded=\\"false\\" class=\\"css-35\\" tabindex=\\"0\\">",
"text": "<div data-automation-id=\\"test\\" aria-roledescription=\\"split button\\" aria-disabled=\\"true\\" data-is-focusable=\\"true\\" role=\\"button\\" aria-haspopup=\\"true\\" aria-expanded=\\"false\\" class=\\"css-34\\" tabindex=\\"0\\">",
},
},
],
"fullyQualifiedLogicalName": ".css-35",
"fullyQualifiedLogicalName": ".css-34",
"physicalLocation": Object {
"fileLocation": Object {
"uri": "about:blank",
Expand All @@ -190,7 +230,7 @@ Array [
"text": "Fix all of the following: ARIA attribute is not widely supported in screen readers and assistive technologies: aria-roledescription.",
},
"partialFingerprints": Object {
"fullyQualifiedLogicalName": ".css-35",
"fullyQualifiedLogicalName": ".css-34",
"ruleId": "aria-allowed-attr",
},
"properties": Object {
Expand Down Expand Up @@ -401,8 +441,8 @@ Array [
],
"message": Object {
"richText": "Fix any of the following:
- Element has insufficient color contrast of 2.21 (foreground color: #a6a6a6, background color: #f4f4f4, font size: 10.5pt, font weight: normal). Expected contrast ratio of 4.5:1",
"text": "Fix any of the following: Element has insufficient color contrast of 2.21 (foreground color: #a6a6a6, background color: #f4f4f4, font size: 10.5pt, font weight: normal). Expected contrast ratio of 4.5:1.",
- Element has insufficient color contrast of 2.35 (foreground color: #a19f9d, background color: #f3f2f1, font size: 10.5pt, font weight: normal). Expected contrast ratio of 4.5:1",
"text": "Fix any of the following: Element has insufficient color contrast of 2.35 (foreground color: #a19f9d, background color: #f3f2f1, font size: 10.5pt, font weight: normal). Expected contrast ratio of 4.5:1.",
},
"partialFingerprints": Object {
"fullyQualifiedLogicalName": ".prefix-15 > span",
Expand Down
72 changes: 0 additions & 72 deletions apps/a11y-tests/src/tests/__snapshots__/TextField.test.ts.snap

This file was deleted.

5 changes: 3 additions & 2 deletions packages/migration/just.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { preset, just } = require('@uifabric/build');
const { task } = just;
const { task, series } = just;

preset();
task('build', 'build:node-lib');
// TODO remove, fix tests on windows environments
task('build', series('clean', 'copy', 'ts:commonjs-only'));

0 comments on commit 1dbb8a9

Please sign in to comment.