Skip to content

Commit 4b4b0f3

Browse files
afweissmaterial-automation
authored andcommitted
Ensure correct Voiceover behavior in iOS 14.
PiperOrigin-RevId: 355892745
1 parent c7a70ce commit 4b4b0f3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

components/BottomNavigation/src/private/MDCBottomNavigationItemView.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ - (void)commonMDCBottomNavigationItemViewInit {
168168
_button.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
169169
_button.accessibilityLabel = [self accessibilityLabelWithTitle:_title];
170170
_button.accessibilityValue = self.accessibilityValue;
171+
// This needs to be set specifically for VoiceOver to work on iOS 14, see b/175421576
172+
if (@available(iOS 14, *)) {
173+
_button.accessibilityTraits |= UIAccessibilityTraitButton;
174+
}
171175
[self addSubview:_button];
172176
}
173177
}

0 commit comments

Comments
 (0)