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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
- Yoga integration improvements [Michael Schneider](https://github.com/maicki)[#1187] (https://github.com/TextureGroup/Texture/pull/1187)
- Correct linePositionModifier behavior [Michael Schneider](https://github.com/maicki)[#1192] (https://github.com/TextureGroup/Texture/pull/1192)
- Tweak a11y label aggregation behavior to enable container label overrides [Michael Schneider](https://github.com/maicki)[#1199] (https://github.com/TextureGroup/Texture/pull/1199)
- Make ASEditableTextNode accessible [Andrew Yates](https://github.com/ay8s)[#1162] (https://github.com/TextureGroup/Texture/pull/1162)

## 2.7
- Fix pager node for interface coalescing. [Max Wang](https://github.com/wsdwsd0829) [#877](https://github.com/TextureGroup/Texture/pull/877)
Expand Down
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