mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 20:07:37 -02:30
add a11y label to StatusIcon
This commit is contained in:
@@ -93,42 +93,43 @@ SkippedBottom.displayName = 'SkippedBottom';
|
|||||||
|
|
||||||
const StatusIcon = ({ status, ...props }) => {
|
const StatusIcon = ({ status, ...props }) => {
|
||||||
return (
|
return (
|
||||||
<div {...props} data-job-status={status}>
|
<div {...props} data-job-status={status} aria-label={status}>
|
||||||
{status === 'running' && <RunningJob />}
|
{status === 'running' && <RunningJob />}
|
||||||
{(status === 'new' ||
|
{(status === 'new' ||
|
||||||
status === 'pending' ||
|
status === 'pending' ||
|
||||||
status === 'waiting' ||
|
status === 'waiting' ||
|
||||||
status === 'never updated') && <WaitingJob />}
|
status === 'never updated') && <WaitingJob />}
|
||||||
{(status === 'failed' || status === 'error' || status === 'canceled') && (
|
{(status === 'failed' || status === 'error' || status === 'canceled') && (
|
||||||
<FinishedJob>
|
<FinishedJob aria-hidden="true">
|
||||||
<FailedTop />
|
<FailedTop />
|
||||||
<FailedBottom />
|
<FailedBottom />
|
||||||
</FinishedJob>
|
</FinishedJob>
|
||||||
)}
|
)}
|
||||||
{(status === 'successful' || status === 'ok') && (
|
{(status === 'successful' || status === 'ok') && (
|
||||||
<FinishedJob>
|
<FinishedJob aria-hidden="true">
|
||||||
<SuccessfulTop />
|
<SuccessfulTop />
|
||||||
<SuccessfulBottom />
|
<SuccessfulBottom />
|
||||||
</FinishedJob>
|
</FinishedJob>
|
||||||
)}
|
)}
|
||||||
{status === 'changed' && (
|
{status === 'changed' && (
|
||||||
<FinishedJob>
|
<FinishedJob aria-hidden="true">
|
||||||
<ChangedTop />
|
<ChangedTop />
|
||||||
<ChangedBottom />
|
<ChangedBottom />
|
||||||
</FinishedJob>
|
</FinishedJob>
|
||||||
)}
|
)}
|
||||||
{status === 'skipped' && (
|
{status === 'skipped' && (
|
||||||
<FinishedJob>
|
<FinishedJob aria-hidden="true">
|
||||||
<SkippedTop />
|
<SkippedTop />
|
||||||
<SkippedBottom />
|
<SkippedBottom />
|
||||||
</FinishedJob>
|
</FinishedJob>
|
||||||
)}
|
)}
|
||||||
{status === 'unreachable' && (
|
{status === 'unreachable' && (
|
||||||
<FinishedJob>
|
<FinishedJob aria-hidden="true">
|
||||||
<UnreachableTop />
|
<UnreachableTop />
|
||||||
<UnreachableBottom />
|
<UnreachableBottom />
|
||||||
</FinishedJob>
|
</FinishedJob>
|
||||||
)}
|
)}
|
||||||
|
<span className="pf-screen-reader">{status}</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user