Skip to content

Commit 10f1b6a

Browse files
committed
fix(ios): Set over a11yIdentifier, not a11yLabel
1 parent d1d244b commit 10f1b6a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/ios/RNNTitleViewHelper.m

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,10 @@ - (UILabel *)setupSubtitle {
136136
UIColor *color = _subtitleOptions.color.get;
137137
subtitleLabel.textColor = color;
138138
}
139-
140-
if (_parentTestID && _parentTestID.hasValue && ((NSString *) _parentTestID.get).length > 0) {
141-
subtitleLabel.accessibilityLabel = [NSString stringWithFormat:@"%@.subtitle", _parentTestID.get];
139+
140+
if (_parentTestID && _parentTestID.hasValue && ((NSString *)_parentTestID.get).length > 0) {
141+
subtitleLabel.accessibilityIdentifier =
142+
[NSString stringWithFormat:@"%@.subtitle", _parentTestID.get];
142143
}
143144

144145
[self.titleView addSubview:subtitleLabel];
@@ -180,8 +181,9 @@ - (UILabel *)setupTitle {
180181
titleLabel.textColor = color;
181182
}
182183

183-
if (_parentTestID && _parentTestID.hasValue && ((NSString *) _parentTestID.get).length > 0) {
184-
titleLabel.accessibilityLabel = [NSString stringWithFormat:@"%@.title", _parentTestID.get];
184+
if (_parentTestID && _parentTestID.hasValue && ((NSString *)_parentTestID.get).length > 0) {
185+
titleLabel.accessibilityIdentifier =
186+
[NSString stringWithFormat:@"%@.title", _parentTestID.get];
185187
}
186188

187189
[self.titleView addSubview:titleLabel];

0 commit comments

Comments
 (0)