Skip to content

Commit cecce78

Browse files
authoredMay 16, 2024··
fix(ObjectStatus): don't announce default icons via screen readers (#5809)
Fixes #5806
1 parent 5ee04d7 commit cecce78

File tree

1 file changed

+4
-4
lines changed
  • packages/main/src/components/ObjectStatus

1 file changed

+4
-4
lines changed
 

‎packages/main/src/components/ObjectStatus/index.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -117,31 +117,31 @@ const getStateSpecifics = (state, showDefaultIcon, userIcon, stateAnnouncementTe
117117
switch (state) {
118118
case ValueState.Error:
119119
if (renderDefaultIcon) {
120-
icon = <Icon name={errorIcon} data-component-name="ObjectStatusDefaultIcon" />;
120+
icon = <Icon name={errorIcon} data-component-name="ObjectStatusDefaultIcon" aria-hidden />;
121121
}
122122
if (!invisibleText) {
123123
invisibleText = errorStateText;
124124
}
125125
break;
126126
case ValueState.Success:
127127
if (renderDefaultIcon) {
128-
icon = <Icon name={successIcon} data-component-name="ObjectStatusDefaultIcon" />;
128+
icon = <Icon name={successIcon} data-component-name="ObjectStatusDefaultIcon" aria-hidden />;
129129
}
130130
if (!invisibleText) {
131131
invisibleText = successStateText;
132132
}
133133
break;
134134
case ValueState.Warning:
135135
if (renderDefaultIcon) {
136-
icon = <Icon name={alertIcon} data-component-name="ObjectStatusDefaultIcon" />;
136+
icon = <Icon name={alertIcon} data-component-name="ObjectStatusDefaultIcon" aria-hidden />;
137137
}
138138
if (!invisibleText) {
139139
invisibleText = warningStateText;
140140
}
141141
break;
142142
case ValueState.Information:
143143
if (renderDefaultIcon) {
144-
icon = <Icon name={informationIcon} data-component-name="ObjectStatusDefaultIcon" />;
144+
icon = <Icon name={informationIcon} data-component-name="ObjectStatusDefaultIcon" aria-hidden />;
145145
}
146146
if (!invisibleText) {
147147
invisibleText = informationStateText;

0 commit comments

Comments
 (0)
Please sign in to comment.