Skip to content

Commit

Permalink
removed tabbar for iOS 9 compatibility issues
Browse files Browse the repository at this point in the history
Summary: Removed Accessibility Trait TabBar for iOS compatibility Issues, since tabbar is only available on iOS 10+

Reviewed By: PeteTheHeat

Differential Revision: D8822469

fbshipit-source-id: 34bf00eb930f631a5a4effa0a4159da07c1573f6
  • Loading branch information
Ziqi Chen authored and facebook-github-bot committed Jul 12, 2018
1 parent 934c50f commit f39d092
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
4 changes: 1 addition & 3 deletions Libraries/Components/View/ViewAccessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ export type AccessibilityRole =
| 'button'
| 'image'
| 'keyboardkey'
| 'text'
| 'tabbar';
| 'text';

module.exports = {
AccessibilityTraits: [
Expand Down Expand Up @@ -79,6 +78,5 @@ module.exports = {
'image',
'keyboardkey',
'text',
'tabbar',
],
};
1 change: 0 additions & 1 deletion React/Views/RCTViewManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ @implementation RCTConvert(UIAccessibilityTraits)
@"header": @(UIAccessibilityTraitHeader),
@"search": @(UIAccessibilityTraitSearchField),
@"image": @(UIAccessibilityTraitImage),
@"tabbar": @(UIAccessibilityTraitTabBar),
@"selected": @(UIAccessibilityTraitSelected),
@"plays": @(UIAccessibilityTraitPlaysSound),
@"key": @(UIAccessibilityTraitKeyboardKey),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ public enum AccessibilityRole {
BUTTON("android.widget.Button"),
IMAGE("android.widget.ImageView"),
KEYBOARD_KEY("android.inputmethodservice.Keyboard$Key"),
TEXT("android.widget.ViewGroup"),
TAB_BAR("android.widget.TabWidget");
TEXT("android.widget.ViewGroup");

@Nullable private final String mValue;

Expand Down Expand Up @@ -90,7 +89,6 @@ public static void setRole(AccessibilityNodeInfoCompat nodeInfo, final Accessibi
private static final String IMAGE = "image";
private static final String KEYBOARDKEY = "keyboardkey";
private static final String TEXT = "text";
private static final String TABBAR = "tabbar";

public static void updateAccessibilityRole(View view, String role) {
if (role == null) {
Expand All @@ -111,9 +109,6 @@ public static void updateAccessibilityRole(View view, String role) {
case TEXT:
setRole(view, AccessibilityRoleUtil.AccessibilityRole.TEXT);
break;
case TABBAR:
setRole(view, AccessibilityRoleUtil.AccessibilityRole.TAB_BAR);
break;
default:
view.setAccessibilityDelegate(null);
}
Expand Down

0 comments on commit f39d092

Please sign in to comment.