Skip to content

Commit a19bcd6

Browse files
committed
add labels for icons status
1 parent 96b78d9 commit a19bcd6

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/lib/components/statusicon/StatusIcon.component.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,30 @@ export const StatusIcon = ({ status }: { status: Status }) => {
2626
return {
2727
color: 'statusHealthy',
2828
name: 'Check-circle',
29-
label: 'Healthy',
29+
label: 'Healthy status icon',
3030
};
3131

3232
case STATUS_WARNING:
3333
return {
3434
color: 'statusWarning',
3535
name: 'Times-circle',
36-
label: 'Warning',
36+
label: 'Warning status icon',
3737
};
3838

3939
case STATUS_CRITICAL:
4040
return {
4141
color: 'statusCritical',
4242
name: 'Times-circle',
43-
label: 'Critical',
43+
label: 'Critical status icon',
4444
};
4545
default:
46-
return { color: 'textTertiary', name: 'Info', label: 'Info' };
46+
return {
47+
color: 'textTertiary',
48+
name: 'Info',
49+
label: 'Information status icon',
50+
};
4751
}
4852
})();
4953

50-
return <Icon color={icon.color} name={icon.name} />;
54+
return <Icon color={icon.color} name={icon.name} aria-label={icon.label} />;
5155
};

0 commit comments

Comments
 (0)