We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10313eb commit 21cd55aCopy full SHA for 21cd55a
src/components/badge/index.tsx
@@ -132,10 +132,10 @@ class Badge extends PureComponent<BadgeProps> {
132
}
133
134
getAccessibilityProps() {
135
- const {onPress, icon, label} = this.props;
+ const {onPress, icon, label, accessibilityLabel} = this.props;
136
137
return {
138
- accessibilityLabel: icon ? 'badge' : label ? `${label} new items` : undefined,
+ accessibilityLabel: accessibilityLabel || label ? `${label} new items` : 'badge',
139
...extractAccessibilityProps(this.props),
140
accessible: !_.isUndefined(label),
141
accessibilityRole: onPress ? 'button' : icon ? 'image' : 'text'
0 commit comments