Skip to content

Commit

Permalink
Add the tabBar trait to the title strip scrollview
Browse files Browse the repository at this point in the history
This way, the accessibility service will say "tab" for the buttons instead of "button", it will point out the selected one and will tell how many there are.
  • Loading branch information
flambert committed Feb 16, 2021
1 parent 3f2142c commit 8c816f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Pod/Classes/MRGPagerTitleStrip.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ - (instancetype)initWithFrame:(CGRect)frame {
_separatorColor = [UIColor colorWithWhite:1 alpha:0.2f];

_scrollView = [[UIScrollView alloc] init];
_scrollView.isAccessibilityElement = NO;
_scrollView.accessibilityTraits = _scrollView.accessibilityTraits | UIAccessibilityTraitTabBar;
_scrollView.scrollsToTop = NO;
_scrollView.showsHorizontalScrollIndicator = NO;
_scrollView.showsVerticalScrollIndicator = NO;
Expand Down

0 comments on commit 8c816f5

Please sign in to comment.