add a11y label to SyncStatusIndicator

This commit is contained in:
Keith Grant
2020-09-30 14:36:07 -07:00
parent c75c6ae03d
commit e204325d1d

View File

@@ -29,13 +29,21 @@ export default function SyncStatusIndicator({ status, title }) {
if (status === 'syncing') { if (status === 'syncing') {
return ( return (
<PulseWrapper> <>
<CloudIcon color={`var(${color})`} title={title} /> <PulseWrapper aria-hidden="true">
</PulseWrapper> <CloudIcon color={`var(${color})`} title={title} />
</PulseWrapper>
<span className="pf-screen-reader">{status}</span>
</>
); );
} }
return <CloudIcon color={`var(${color})`} title={title} />; return (
<>
<CloudIcon color={`var(${color})`} title={title} aria-hidden="true" />
<span className="pf-screen-reader">{status}</span>
</>
);
} }
SyncStatusIndicator.propTypes = { SyncStatusIndicator.propTypes = {
status: oneOf(['success', 'error', 'disabled', 'syncing']).isRequired, status: oneOf(['success', 'error', 'disabled', 'syncing']).isRequired,