Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8037133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:50:07+00:00 2026-06-05T02:50:07+00:00

Trying to determine based on a CGPoint inside a window, what (if any) accessibility

  • 0

Trying to determine based on a CGPoint inside a window, what (if any) accessibility element is hit. Is this possible? Sort of an Accessibility Element hit test… Should return any accessibility element hit (including System created). Seems like there has to be a way to do this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T02:50:09+00:00Added an answer on June 5, 2026 at 2:50 am

    I fear that in order to achieve what you want, you’ll have to basically re-implement how e.g. browsers do the capture phase in their event handling in the DOM:

    • Start at the most general element — in any UIKit-based app, this will be the application’s keyWindow or (if your App is multiscreen) the front most window of the screen which you’ll have to figure out through the windowLevel etc.
    • Check whether the object in question is an accessibility-container, and
      • if so, recurse into that, asking for the appropriate thing.
      • If it’s not, check whether it is an accessibility-element, and
        • if it’s not bail.
        • If it is, check whether its accessibility-frame contains the point in question.
        • Now if that happens to be the case, congratulations: You have succeeded in finding the element in question, so you should return it.
        • If that isn’t so, bail.

    By now, we have handled the cases accessibility-element and element inside container.

    There is one additional case to cover and that are accessibility-containers, which are themselves accessibility-elements:
    We have a container, that did not yield an element for the point in question.

    If it is an accessibility-element, check whether its frame contains the point, and
    – if so, return self,
    – if not, bail.

    And by bail I always mean return nil.

    Now grab all that logic, turn it into code, and put it in a category on NSObject.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to determine, based on the result of this call, if it was
I'm trying to create a form that based on the users input would determine
Trying to determine if it is possible to bind the SelectedValue of a ComboBox
I'm trying to determine the window position of an application. I know SetWindowPos() would
I'm trying to determine if there is a way to accomplish this elegantly. I
I am trying to determine the best approach when designing a new Access based
I'm trying to determine the best starting structure (navigation, windows based, something else) for
I'm trying to determine if a match, or matches exist within an array based
I'm trying to determine a file based on specific parameters. First, I am recursively
I'm trying to determine what would be the most efficient/recommended way of doing this--I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.