Use accessibilityActivationPoint when determining where to tap elements.#1305
Merged
Merged
Conversation
kyleve
approved these changes
Sep 19, 2024
justinseanmartin
approved these changes
Sep 24, 2024
justinseanmartin
left a comment
Contributor
There was a problem hiding this comment.
To verify the behavior and prevent regressions, it would be nice to have a test where tapping on a control updates a label with what coordinates it was tapped at and then set a custom accessibility tap point on it.
| UIView *hitView = nil; | ||
| CGPoint tapPoint = CGPointZero; | ||
|
|
||
| // accessibilityActivationPoint |
Contributor
There was a problem hiding this comment.
Would be good to document here that it defaults to the center if no override is set.
1c865ef to
7457790
Compare
fe71ae1 to
72be8a5
Compare
amorde
pushed a commit
to amorde/KIF
that referenced
this pull request
Jun 26, 2025
amorde
pushed a commit
to amorde/KIF
that referenced
this pull request
Feb 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If a call to
accessibilityActivate()returns false, VoiceOver (and related assistive technologies) will issue a tap event to the element as a secondary attempt to activate it via the the standard touch pipeline. TheaccessibilityActivationPointcan be set on elements to instruct assistive technologies where specifically on the screen to issue this tap event.We should take this property into consideration when deciding the same. This is particularly important when the value is set deliberately. Failing to do so can cause taps to be issued that don't properly activate the element.
In the case where the property has not been explicitly set. The default value is the midpoint of the accessibility frame, which itself has a default value equivalent to self.frame this makes the change functionally equivalent to the following line which returns the midpoint of the frame.