[ASTextNode2] Integrate Google's changes to ASTN2 and accessibility
This PR takes the changes related to ASTextNode2 from https://github.com/TextureGroup/Texture/pull/1986 and merges them into master.
The largest changes were:
- Improved layout (with Yoga) for ASTN2
- Improved truncating with ASTN2
- Improved accessibility
My biggest concern is that there were many changes on master around accessibility that conflicted with what Google implemented. In Google's PR https://github.com/TextureGroup/Texture/pull/1986, the changes on master were placed behind these experimental feature checks:
ASExperimentalDoNotCacheAccessibilityElements
ASExperimentalEnableNodeIsHiddenFromAcessibility
ASExperimentalEnableAcessibilityElementsReturnNil
However, since the changes behind these flags are currently live on master, I think this is the behavior that should still be the default on master. I would say that we either add code to opt-in to these experiments in this PR or we switch the logic so that the changes from Google's PR are the "experimental" path.
@wiseoldduck Here is a second attempt that includes the accessibility changes. Maybe the first time around i left those out because I thought someone from Google was looking in making an accessibility PR?