From c75c6ae03d4d2fcc285cf4decc6e7d2642786ddf Mon Sep 17 00:00:00 2001 From: Keith Grant Date: Wed, 30 Sep 2020 14:32:45 -0700 Subject: [PATCH 1/4] add a11y label to StatusIcon --- .../src/components/StatusIcon/StatusIcon.jsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/awx/ui_next/src/components/StatusIcon/StatusIcon.jsx b/awx/ui_next/src/components/StatusIcon/StatusIcon.jsx index c386a270e9..2565765f00 100644 --- a/awx/ui_next/src/components/StatusIcon/StatusIcon.jsx +++ b/awx/ui_next/src/components/StatusIcon/StatusIcon.jsx @@ -93,42 +93,43 @@ SkippedBottom.displayName = 'SkippedBottom'; const StatusIcon = ({ status, ...props }) => { return ( -
+
{status === 'running' && } {(status === 'new' || status === 'pending' || status === 'waiting' || status === 'never updated') && } {(status === 'failed' || status === 'error' || status === 'canceled') && ( - + )} {(status === 'successful' || status === 'ok') && ( - + )} {status === 'changed' && ( - + )} {status === 'skipped' && ( - + )} {status === 'unreachable' && ( - + )} + {status}
); }; From e204325d1d2704731ed432c9e6ba0135726b96dd Mon Sep 17 00:00:00 2001 From: Keith Grant Date: Wed, 30 Sep 2020 14:36:07 -0700 Subject: [PATCH 2/4] add a11y label to SyncStatusIndicator --- .../SyncStatusIndicator/SyncStatusIndicator.jsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/awx/ui_next/src/components/SyncStatusIndicator/SyncStatusIndicator.jsx b/awx/ui_next/src/components/SyncStatusIndicator/SyncStatusIndicator.jsx index 77cb158548..2ccf283576 100644 --- a/awx/ui_next/src/components/SyncStatusIndicator/SyncStatusIndicator.jsx +++ b/awx/ui_next/src/components/SyncStatusIndicator/SyncStatusIndicator.jsx @@ -29,13 +29,21 @@ export default function SyncStatusIndicator({ status, title }) { if (status === 'syncing') { return ( - - - + <> + + {status} + ); } - return ; + return ( + <> +
); }; diff --git a/awx/ui_next/src/screens/Job/JobDetail/JobDetail.test.jsx b/awx/ui_next/src/screens/Job/JobDetail/JobDetail.test.jsx index 2d5ff5d5fe..729d043686 100644 --- a/awx/ui_next/src/screens/Job/JobDetail/JobDetail.test.jsx +++ b/awx/ui_next/src/screens/Job/JobDetail/JobDetail.test.jsx @@ -28,14 +28,18 @@ describe('', () => { expect(wrapper.find(`Detail[label="${label}"] dd`).text()).toBe(value); } - assertDetail('Status', 'Successful'); + // StatusIcon adds visibly hidden accessibility text " successful " + assertDetail('Status', ' successful Successful'); assertDetail('Started', '8/8/2019, 7:24:18 PM'); assertDetail('Finished', '8/8/2019, 7:24:50 PM'); assertDetail('Job Template', mockJobData.summary_fields.job_template.name); assertDetail('Job Type', 'Run'); assertDetail('Launched By', mockJobData.summary_fields.created_by.username); assertDetail('Inventory', mockJobData.summary_fields.inventory.name); - assertDetail('Project', mockJobData.summary_fields.project.name); + assertDetail( + 'Project', + ` successful ${mockJobData.summary_fields.project.name}` + ); assertDetail('Revision', mockJobData.scm_revision); assertDetail('Playbook', mockJobData.playbook); assertDetail('Verbosity', '0 (Normal)'); diff --git a/awx/ui_next/src/screens/Job/JobOutput/HostEventModal.test.jsx b/awx/ui_next/src/screens/Job/JobOutput/HostEventModal.test.jsx index 01b6ed61bd..bb4b538142 100644 --- a/awx/ui_next/src/screens/Job/JobOutput/HostEventModal.test.jsx +++ b/awx/ui_next/src/screens/Job/JobOutput/HostEventModal.test.jsx @@ -103,7 +103,8 @@ describe('HostEventModal', () => { expect(wrapper.find(`Detail[label="${label}"] dd`).text()).toBe(value); } - assertDetail('Host Name', 'foo'); + // StatusIcon adds visibly hidden accessibility text " changed " + assertDetail('Host Name', ' changed foo'); assertDetail('Play', 'all'); assertDetail('Task', 'command'); assertDetail('Module', 'command'); From b7070b7a7240e75bf48b532a871c5643aed9540e Mon Sep 17 00:00:00 2001 From: Keith Grant Date: Mon, 5 Oct 2020 08:23:41 -0700 Subject: [PATCH 4/4] add aria-hidden to Running/Waiting job icons --- awx/ui_next/src/components/StatusIcon/StatusIcon.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/ui_next/src/components/StatusIcon/StatusIcon.jsx b/awx/ui_next/src/components/StatusIcon/StatusIcon.jsx index 7d9973f92e..7c61e3388e 100644 --- a/awx/ui_next/src/components/StatusIcon/StatusIcon.jsx +++ b/awx/ui_next/src/components/StatusIcon/StatusIcon.jsx @@ -94,11 +94,11 @@ SkippedBottom.displayName = 'SkippedBottom'; const StatusIcon = ({ status, ...props }) => { return (
- {status === 'running' && } + {status === 'running' &&