Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ASEditableTextNode accessible to VoiceOver #1162

Merged
merged 13 commits into from
Nov 10, 2018
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -622,4 +622,4 @@



\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
ay8s marked this conversation as resolved.
Show resolved Hide resolved
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
20 changes: 20 additions & 0 deletions Source/ASEditableTextNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -842,4 +842,24 @@ - (void)_delegateDidFinishEditing
[_delegate editableTextNodeDidFinishEditing:self];
}

ay8s marked this conversation as resolved.
Show resolved Hide resolved
- (NSInteger)accessibilityElementCount
{
return 1;
}

- (NSArray *)accessibilityElements
ay8s marked this conversation as resolved.
Show resolved Hide resolved
{
return @[self.textView];
}

- (id)accessibilityElementAtIndex:(NSInteger)index
{
return self.textView;
}

- (NSInteger)indexOfAccessibilityElement:(id)element
{
return 0;
}

@end