Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

0.12 feature support accessibility #149

Merged
merged 18 commits into from
Mar 29, 2017
Merged

Conversation

acton393
Copy link
Member

@acton393 acton393 commented Mar 23, 2017

@acton393 acton393 changed the title * [ios] support accessibility 0.12 feature support accessibility Mar 23, 2017
@sospartan
Copy link
Contributor

@YorkShen
Copy link
Contributor

@sospartan Good to merge

if (0 == [[self.view subviews] count]) {
self.view.isAccessibilityElement = YES;
self.view.accessibilityFrame = [[self.view superview] convertRect:self.calculatedFrame toView:nil];
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.view maybe not ready here, please add this logic to [self view], too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You do not have to set this property for an accessibility element that represents a subclass of UIView, because such an object’s screen coordinates are already known.

{
if (attributes[@"role"]){
_role = [WXConvert WXUIAccessibilityTraits:attributes[@"role"]];
self.view.accessibilityTraits = _role;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.view maybe not ready here,

@asfgit asfgit merged commit 18af316 into apache:0.12-dev Mar 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants