8 Commits

Author SHA1 Message Date
Garrett Moon
7d21ccc184 [_ASDisplayViewAccessiblity] Fix accessibility in scroll views (#2079)
* Fixes issues with accessibility elements in scroll views

There are two changes here:

1. Because we can't reliably update the screen positions of accessibility elements
contained within a scroll view, we need to calculate them on demand, so we override
the accessibilityFrame method to do that.

2. Throwing away our calculated accessibility elements on frame change seemed to
cause the accessibility system to be confused.

Combining these two fixes together results in success, yay!

* Don't set the accessibilityFrame, getter is overridden.
2016-08-16 17:01:06 -07:00
Michael Schneider
c65b2efed7 [_ASDisplayViewAccessiblity] Improve accessibility support (#2060)
* First approach to improve accessiblity

* Clear accessibleElements in addSubview: and willRemoveSubview:

* Adjust comments and rename viewNode to node

* Create new accessible elements if screen coordinates of view changes

* Remove legacy clearing of accessibleElements

* Performance improvements

* Use bounds for screenFrame calculation and indexOfObjectIdentical: in indexOfAccessiblityElement:

* Add ASDK_ACCESSIBILITY_DISABLE compiler flag to disable custom accessibility code in ASDK

* No need to set a frame if a subnode view is an accessibility element and not layer backed
2016-08-16 10:27:14 -07:00
appleguy
3b2af7eb6d [Build] Remove Unused Imports across all of AsyncDisplayKit. This uses a feature of AppCode. (#1875)
Details on the tool are here: https://www.jetbrains.com/help/idea/2016.1/optimizing-imports.html
2016-07-09 17:20:59 -07:00
Hannah Troisi
c857e809f4 Clean up header comments (for consistent Facebook licensing info) (#1741)
[Licensing] Clean up header comments (for consistent Facebook licensing info)
2016-06-11 23:31:39 -07:00
Michael Schneider
2fade63f1b Add handling layer backed accessibility elements within layer backed nodes 2016-04-11 12:59:04 -07:00
Michael Schneider
6a147021bc Move setting of accessibilityFrame into accessibleElements
- Calculate accessibilityFrame for accessibleElements already in accessibleElements method
- Remove asyncdisplaykit_node associated object as it's not needed anymore
2016-04-09 17:03:35 -07:00
Michael Schneider
1b7db082dd Improve _ASDisplayViewAccessibility
- Add class method to create a UIAccessibilityElement from a ASDisplayNode
- Add function to iterate through a ASDisplayNode tree in bfs fashion
- Add assert for _accessibleElements in accessibilityElementAtIndex:
2016-04-09 16:07:30 -07:00
Michael Schneider
14ca529911 Moving accessibility related code to _ASDisplayViewAccessibility 2016-04-09 11:23:25 -07:00