From 5eddb14a330c31fe9369b9d350a9755d49c0d8e2 Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Tue, 25 Aug 2020 10:56:02 -0500 Subject: [PATCH] Add component accessibility auditing and fixes (#8679) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This continues #8455 by adding accessibility audits to component integration tests and fixing associated errors. It adds audits to existing tests rather than adding separate ones to facilitate auditing the various permutations a component’s rendering can go through. It also adds linting to ensure audits happen in component tests. This necessitated consolidating test files that were scattered. --- ui/app/templates/components/fs/file.hbs | 2 +- .../components/multi-select-dropdown.hbs | 53 ++++++----- ui/tests/.eslintrc.js | 39 +++++--- ui/tests/acceptance/allocation-detail-test.js | 3 +- .../acceptance/application-errors-test.js | 4 +- ui/tests/acceptance/behaviors/fs.js | 94 +++++++++++++++---- ui/tests/acceptance/client-detail-test.js | 3 +- ui/tests/acceptance/client-monitor-test.js | 3 +- ui/tests/acceptance/clients-list-test.js | 3 +- ui/tests/acceptance/exec-test.js | 3 +- ui/tests/acceptance/job-allocations-test.js | 3 +- ui/tests/acceptance/job-definition-test.js | 3 +- ui/tests/acceptance/job-deployments-test.js | 3 +- ui/tests/acceptance/job-detail-test.js | 21 +++-- ui/tests/acceptance/job-evaluations-test.js | 3 +- ui/tests/acceptance/job-run-test.js | 3 +- ui/tests/acceptance/job-versions-test.js | 3 +- ui/tests/acceptance/jobs-list-test.js | 3 +- ui/tests/acceptance/namespaces-test.js | 3 +- .../acceptance/plugin-allocations-test.js | 3 +- ui/tests/acceptance/plugin-detail-test.js | 3 +- ui/tests/acceptance/plugins-list-test.js | 3 +- ui/tests/acceptance/regions-test.js | 3 +- ui/tests/acceptance/server-detail-test.js | 3 +- ui/tests/acceptance/server-monitor-test.js | 3 +- ui/tests/acceptance/servers-list-test.js | 3 +- ui/tests/acceptance/task-detail-test.js | 3 +- ui/tests/acceptance/task-group-detail-test.js | 3 +- ui/tests/acceptance/task-logs-test.js | 3 +- ui/tests/acceptance/token-test.js | 3 +- ui/tests/acceptance/volume-detail-test.js | 3 +- ui/tests/acceptance/volumes-list-test.js | 3 +- ui/tests/helpers/a11y-audit.js | 22 +++-- .../{ => components}/agent-monitor-test.js | 7 +- .../{ => components}/allocation-row-test.js | 5 +- .../{ => components}/app-breadcrumbs-test.js | 5 +- .../{ => components}/attributes-table-test.js | 3 + .../components/copy-button-test.js | 6 +- .../{ => components}/fs/file-test.js | 10 +- .../{ => components}/gauge-chart-test.js | 3 + .../{ => components}/image-file-test.js | 3 + .../{ => components}/job-diff-test.js | 7 +- .../{ => components}/job-editor-test.js | 17 ++++ .../{ => components}/job-page/helpers.js | 0 .../job-page/parts/body-test.js | 3 + .../job-page/parts/children-test.js | 3 + .../job-page/parts/latest-deployment-test.js | 5 + .../job-page/parts/placement-failures-test.js | 3 + .../job-page/parts/summary-test.js | 7 ++ .../job-page/parts/task-groups-test.js | 3 + .../job-page/periodic-test.js | 3 + .../{ => components}/job-page/service-test.js | 9 ++ .../components/lifecycle-chart-test.js | 4 + .../integration/components/line-chart-test.js | 5 + .../{ => components}/list-pagination-test.js | 3 + .../{ => components}/list-table-test.js | 3 + .../multi-select-dropdown-test.js | 8 ++ .../{ => components}/page-layout-test.js | 2 + .../placement-failure-test.js | 7 +- .../plugin-allocation-row-test.js | 2 + .../{ => components}/popover-menu-test.js | 3 + .../{ => components}/primary-metric-test.js | 2 + .../reschedule-event-timeline-test.js | 7 ++ .../components/scale-events-accordion-test.js | 6 ++ .../scale-events-chart-test.js | 4 + .../{ => components}/stepper-input-test.js | 3 + .../{ => components}/streaming-file-test.js | 4 +- .../{ => components}/task-group-row-test.js | 9 ++ .../{ => components}/task-log-test.js | 9 +- .../{ => components}/toggle-test.js | 7 ++ .../{ => components}/two-step-button-test.js | 8 ++ 71 files changed, 379 insertions(+), 132 deletions(-) rename ui/tests/integration/{ => components}/agent-monitor-test.js (95%) rename ui/tests/integration/{ => components}/allocation-row-test.js (95%) rename ui/tests/integration/{ => components}/app-breadcrumbs-test.js (94%) rename ui/tests/integration/{ => components}/attributes-table-test.js (95%) rename ui/tests/integration/{ => components}/fs/file-test.js (96%) rename ui/tests/integration/{ => components}/gauge-chart-test.js (92%) rename ui/tests/integration/{ => components}/image-file-test.js (96%) rename ui/tests/integration/{ => components}/job-diff-test.js (96%) rename ui/tests/integration/{ => components}/job-editor-test.js (95%) rename ui/tests/integration/{ => components}/job-page/helpers.js (100%) rename ui/tests/integration/{ => components}/job-page/parts/body-test.js (95%) rename ui/tests/integration/{ => components}/job-page/parts/children-test.js (97%) rename ui/tests/integration/{ => components}/job-page/parts/latest-deployment-test.js (97%) rename ui/tests/integration/{ => components}/job-page/parts/placement-failures-test.js (95%) rename ui/tests/integration/{ => components}/job-page/parts/summary-test.js (96%) rename ui/tests/integration/{ => components}/job-page/parts/task-groups-test.js (97%) rename ui/tests/integration/{ => components}/job-page/periodic-test.js (97%) rename ui/tests/integration/{ => components}/job-page/service-test.js (96%) rename ui/tests/integration/{ => components}/list-pagination-test.js (97%) rename ui/tests/integration/{ => components}/list-table-test.js (95%) rename ui/tests/integration/{ => components}/multi-select-dropdown-test.js (97%) rename ui/tests/integration/{ => components}/page-layout-test.js (93%) rename ui/tests/integration/{ => components}/placement-failure-test.js (94%) rename ui/tests/integration/{ => components}/plugin-allocation-row-test.js (96%) rename ui/tests/integration/{ => components}/popover-menu-test.js (95%) rename ui/tests/integration/{ => components}/primary-metric-test.js (97%) rename ui/tests/integration/{ => components}/reschedule-event-timeline-test.js (95%) rename ui/tests/integration/{ => components}/scale-events-chart-test.js (94%) rename ui/tests/integration/{ => components}/stepper-input-test.js (98%) rename ui/tests/integration/{ => components}/streaming-file-test.js (96%) rename ui/tests/integration/{ => components}/task-group-row-test.js (95%) rename ui/tests/integration/{ => components}/task-log-test.js (97%) rename ui/tests/integration/{ => components}/toggle-test.js (91%) rename ui/tests/integration/{ => components}/two-step-button-test.js (95%) diff --git a/ui/app/templates/components/fs/file.hbs b/ui/app/templates/components/fs/file.hbs index 471dc0bee98..e4111f9a516 100644 --- a/ui/app/templates/components/fs/file.hbs +++ b/ui/app/templates/components/fs/file.hbs @@ -16,7 +16,7 @@ {{/if}} {{#if this.isStreamable}} - {{/if}} diff --git a/ui/app/templates/components/multi-select-dropdown.hbs b/ui/app/templates/components/multi-select-dropdown.hbs index 6def164e6b8..a9dd9c68eee 100644 --- a/ui/app/templates/components/multi-select-dropdown.hbs +++ b/ui/app/templates/components/multi-select-dropdown.hbs @@ -4,7 +4,7 @@ @onClose={{action (mut this.isOpen) false}} as |dd| > -