-
Notifications
You must be signed in to change notification settings - Fork 6k
[iOS][A11Y] fix hittest with non-SemanticsObject #44014
Conversation
| - (id)_accessibilityHitTest:(CGPoint)point withEvent:(UIEvent*)event { | ||
| return [self search:point]; | ||
| id hittest = [self search:point]; | ||
| if (hittest != self) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just check if hittest is a semanticObject here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure. done
8898a31 to
8a1fb47
Compare
| if (![hittest isKindOfClass:[SemanticsObject class]]) { | ||
| // If hittest result is not a SemanticsObject (e.g. PlatformView), | ||
| // call the default hittest method to find the hittest result inside the "hittest". | ||
| return [(NSObject*)hittest _accessibilityHitTest:point withEvent:event]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not viable, unfortunately.
If we can't implement this method without needing to make a call like this, we'll need to remove the method entirely and find a different workaround for the initial problem it was added to address.
8a1fb47 to
c1d3fd0
Compare
|
@stuartmorgan I overthought the problem. The fix is actually a lot simpler than what I had. PTAL |
stuartmorgan-g
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! LGTM
…131790) flutter/engine@d6b962d...9304c00 2023-08-02 [email protected] Roll ANGLE from d29f946d6180 to 01ee134bb223 (1 revision) (flutter/engine#44269) 2023-08-02 [email protected] [iOS][A11Y] fix hittest with non-SemanticsObject (flutter/engine#44014) 2023-08-02 [email protected] Roll ANGLE from d61a50c155bd to d29f946d6180 (1 revision) (flutter/engine#44267) 2023-08-02 [email protected] Roll Skia from 6009cc6d7d80 to 514c66ce0471 (2 revisions) (flutter/engine#44268) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
PlatformViewSemanticsContainer did not implement the nativeAccessibility method, leads to a nil object being returned. Fixes flutter/flutter#131014 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Cherry-pick #44014 Fixes flutter/flutter#131885 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
PlatformViewSemanticsContainer did not implement the nativeAccessibility method, leads to a nil object being returned. Fixes flutter/flutter#131014 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
PlatformViewSemanticsContainer did not implement the nativeAccessibility method, leads to a nil object being returned.
Fixes flutter/flutter#131014
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.