Skip to content

Commit 89bbd32

Browse files
Update icon related components after update of core-ui: Improve accessbility for icon with meaning, add tooltip to icon only button
1 parent 06f8a1d commit 89bbd32

5 files changed

Lines changed: 10 additions & 7 deletions

File tree

ui/src/components/DashboardGlobalHealth.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const DashboardGlobalHealth = () => {
6161
<Box flex="1" display="flex">
6262
<PlatformStatusIcon>
6363
<StatusWrapper status={platformStatus}>
64-
<StatusIcon status={platformStatus} name="Datacenter" />
64+
<StatusIcon status={platformStatus} name="Datacenter" entity='Platform' />
6565
</StatusWrapper>
6666
</PlatformStatusIcon>
6767

ui/src/components/DashboardInventory.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ const DashboardInventory = () => {
102102
<InventoryIcon>
103103
<StatusWrapper status={nodesStatus}>
104104
<Icon
105-
name="Node-backend"
105+
name="Exclamation-circle"
106106
color={getStatusColor(nodesStatus)}
107-
ariaLabel={nodesStatus}
107+
ariaLabel={`Nodes status is ${nodesStatus}`}
108108
/>
109109
</StatusWrapper>
110110
</InventoryIcon>
@@ -139,7 +139,7 @@ const DashboardInventory = () => {
139139
<Icon
140140
name="Volume-backend"
141141
color={getStatusColor(volumesStatus)}
142-
ariaLabel={volumesStatus}
142+
ariaLabel={`Volumes status is ${volumesStatus}`}
143143
/>
144144
</StatusWrapper>
145145
</InventoryIcon>

ui/src/components/StatusIcon.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
STATUS_HEALTH,
88
} from '../constants';
99

10-
const StatusIcon = ({ name, status }) => {
10+
const StatusIcon = ({ name, status, entity }) => {
1111
const color = (() => {
1212
switch (status) {
1313
case STATUS_SUCCESS:
@@ -30,7 +30,7 @@ const StatusIcon = ({ name, status }) => {
3030
}
3131
})();
3232

33-
return <Icon color={color} name={name} />;
33+
return <Icon color={color} name={name} ariaLabel={`${entity} status is ${status}`}/>;
3434
};
3535

3636
export default StatusIcon;

ui/src/containers/AlertPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function AlertPageHeader({
118118
<Title>
119119
<AlertStatusIcon>
120120
<StatusWrapper status={alertStatus}>
121-
<StatusIcon status={alertStatus} name="Alert" />
121+
<StatusIcon status={alertStatus} name="Alert" entity='Alerts' />
122122
</StatusWrapper>
123123
</AlertStatusIcon>
124124
<>

ui/src/containers/CreateVolume.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,9 @@ const CreateVolume = (props) => {
818818
icon={<Icon name="Delete" />}
819819
type="button"
820820
onClick={() => removeLabel(key)}
821+
tooltip={{
822+
overlay: "Remove label",
823+
}}
821824
/>
822825
</LabelsKeyValue>
823826
))}

0 commit comments

Comments
 (0)