-
Notifications
You must be signed in to change notification settings - Fork 25k
Allow accessibilityOrder to reference itself #51004
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
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D73792934 |
Summary: It would be very convenient if `accessibilityOrder` could reference itself. Meaning the View with the `accessibilityOrder` prop can include its own `nativeID` in the array. This makes sense API wise - we allow for referencing parents and their descendants, so long as they are treated as an element and not a container. This is pretty nice since you no longer have to wrap everything in a View who's sole purpose is `accessibilityOrder`. Under the hood things get a bit garbled, however, since iOS only lets you have UIViews that are either accessibility elements or accessibility containers - and we need to support both at the same time for this to work. To do this, we make use of the `UIAccessibilityElement` class and just forward all of the logic to the View with the `accessibilityOrder` prop. This View will also not be an accessibility element from the point of view of iOS. Changelog: [Internal] Differential Revision: D73792934
7cf66ad to
cd10da2
Compare
|
This pull request was exported from Phabricator. Differential Revision: D73792934 |
Summary: Pull Request resolved: facebook#51004 It would be very convenient if `accessibilityOrder` could reference itself. Meaning the View with the `accessibilityOrder` prop can include its own `nativeID` in the array. This makes sense API wise - we allow for referencing parents and their descendants, so long as they are treated as an element and not a container. This is pretty nice since you no longer have to wrap everything in a View who's sole purpose is `accessibilityOrder`. Under the hood things get a bit garbled, however, since iOS only lets you have UIViews that are either accessibility elements or accessibility containers - and we need to support both at the same time for this to work. To do this, we make use of the `UIAccessibilityElement` class and just forward all of the logic to the View with the `accessibilityOrder` prop. This View will also not be an accessibility element from the point of view of iOS. Changelog: [Internal] Differential Revision: D73792934
cd10da2 to
31e233d
Compare
Summary: It would be very convenient if `accessibilityOrder` could reference itself. Meaning the View with the `accessibilityOrder` prop can include its own `nativeID` in the array. This makes sense API wise - we allow for referencing parents and their descendants, so long as they are treated as an element and not a container. This is pretty nice since you no longer have to wrap everything in a View who's sole purpose is `accessibilityOrder`. Under the hood things get a bit garbled, however, since iOS only lets you have UIViews that are either accessibility elements or accessibility containers - and we need to support both at the same time for this to work. To do this, we make use of the `UIAccessibilityElement` class and just forward all of the logic to the View with the `accessibilityOrder` prop. This View will also not be an accessibility element from the point of view of iOS. Changelog: [Internal] Differential Revision: D73792934
31e233d to
5eabaec
Compare
|
This pull request was exported from Phabricator. Differential Revision: D73792934 |
|
This pull request has been merged in 4d8eeb3. |
|
This pull request was successfully merged by @joevilches in 4d8eeb3 When will my fix make it into a release? | How to file a pick request? |
Summary:
It would be very convenient if
accessibilityOrdercould reference itself. Meaning the View with theaccessibilityOrderprop can include its ownnativeIDin the array. This makes sense API wise - we allow for referencing parents and their descendants, so long as they are treated as an element and not a container. This is pretty nice since you no longer have to wrap everything in a View who's sole purpose isaccessibilityOrder.Under the hood things get a bit garbled, however, since iOS only lets you have UIViews that are either accessibility elements or accessibility containers - and we need to support both at the same time for this to work. To do this, we make use of the
UIAccessibilityElementclass and just forward all of the logic to the View with theaccessibilityOrderprop. This View will also not be an accessibility element from the point of view of iOS.Changelog: [Internal]
Differential Revision: D73792934