Skip to content

Conversation

@FalseLobster
Copy link
Contributor

@FalseLobster FalseLobster commented Apr 18, 2023

Description

Add support for getBoundingRect and ElementProviderFromPoint in Fabric, which is currently stubbed out. Note current implementation only supports HWND-based hosting scenarios, I will tackle Visual-based hosting in a future PR. This is primarily used to enable the Inspect feature of accessibility dev tools, allowing mouse over of React Components to see their a11y representation.

Type of Change

  • New feature (non-breaking change which adds functionality)

Why

Currently these functions are stubbed out and any AT functionality depending on them does not work.

What

  • I updated hitTest to take an optional parameter to ignorePointerEvents to reuse the existing hitTest logic
  • getBoundingRect for the non-Root node uses existing getClientRect function
  • getBoundingRect for the Root node needs to factor in the non-client area and actual screen position so it uses ClientToScreen to create the Rect
  • I updated some of the winrt QI calls from as -> try_as since it's the non-throwing impl

Screenshots

image

Testing

Manually verified Inspect feature works in Accessibility Insights

Microsoft Reviewers: Open in CodeFlow

@FalseLobster FalseLobster added the Area: Fabric Support Facebook Fabric label Apr 18, 2023
@FalseLobster FalseLobster requested a review from a team as a code owner April 18, 2023 21:03
@FalseLobster FalseLobster merged commit 1badc96 into microsoft:main Apr 26, 2023
@FalseLobster FalseLobster deleted the allypolish branch April 26, 2023 16:59
@jonthysell jonthysell added the New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Fabric Support Facebook Fabric Needed for Accessibility Grading New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants