をUITextView
使用してテキスト ビューで作成された 2 つの埋め込みリンクを含む属性付き文字列を含む がありますNSLinkAttributeName
。テストを自動化するためにひょうたんを使用していますが、ひょうたんはこれらの TextViews 内のリンクを「タップ」できません。これらのリンクUITextView
を自動化/アクセシビリティツールにタップ可能にするために欠けているものはありますか?
ユーザーはこれらのリンクをタップでき、予想されるデリゲート コールバックが機能していることが確認されます。機能しない唯一のケースは、アクセシビリティ ツールを使用して .xml 内に埋め込まれたリンクをタップしようとした場合UITextView
です。
参考のため:
NSDictionary *plainAttributes = [self plainTextAttributes];
NSDictionary *linkAttributes = [self linkAttributes];
NSMutableDictionary *linkOneAttributes = [linkAttributes mutableCopy];
termsOfUseAttributes[NSLinkAttributeName] = @"linkOne";
NSMutableDictionary *linkTwoAttributes = [linkAttributes mutableCopy];
privacyPolicyAttributes[NSLinkAttributeName] = @"linkTwo";
NSMutableAttributedString *string = [NSMutableAttributedString new];
[string appendAttributedString:[[NSAttributedString alloc] initWithString:@"Blah blah blah blah " attributes:plainAttributes]];
[string appendAttributedString:[[NSAttributedString alloc] initWithString:@"Link One" attributes:linkOneAttributes]];
[string appendAttributedString:[[NSAttributedString alloc] initWithString:@". Blah blah blah blah" attributes:plainAttributes]];
[string appendAttributedString:[[NSAttributedString alloc] initWithString:@"Link Two" attributes:linkTwoAttributes]];
[string appendAttributedString:[[NSAttributedString alloc] initWithString:@"." attributes:plainAttributes]];
NSLinkAttributeName
inの属性付き文字列を使用する際のアクセシビリティについての洞察をUITextView
いただければ幸いです。