microsoft / microsoft/react-native-windows

Paper and Fabric's mapping of accessibilityRole to UIA ControlType does not conform with the ARIA Core AAM

Open
#11,432 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Accessibility Area: Fabric bug New Architecture Workstream: Accessibility
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

Problem Description

Meta introduced a number of new higher-precedence aria- props in 0.71, including a new role prop, and seems to be increasingly converging with ARIA standards. While adding support for accessibility in Fabric I noticed that a number of the role mappings used by Paper are not consistent with the ARIA Core AAM (Accessibility API mapping, spec-ing how ARIA props should map to native accessibility frameworks). Here's the current role mapping table showing how aria roles translate to UIA Control Types and other associated UIA APIs. (Note there is a editor's draft of Core AAM v1.2 which can be found here).

Notably the following accessibilityRoles are inconsistent:

RN accessibilityRole Core AAM Control Type Paper Impl
alert UIA_GroupControlTypeId Text
radiogroup UIA_ListControlTypeId Group

We should understand the implications of this divergence and either correct the implementation of accessibilityRole on Paper and Fabric or consider mapping the new aria-inspired role prop accordingly.

Steps To Reproduce

See DynamicAutomationPeer and CompsositionDynamicAutomationProvider (in PR)

Expected Results

We should either correct accessibilityRole to map like the core aam specifies or implement the new role prop accordingly if that change is too breaking.

CLI version

11.0.0-alpha.2

Environment
System:
    OS: Windows 10 10.0.22621
    CPU: (20) x64 Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz
    Memory: 96.30 GB / 127.71 GB
  Binaries:
    Node: 18.15.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 9.5.0 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  Managers:
    RubyGems: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK:
      AllowDevelopmentWithoutDevLicense: Enabled
      AllowAllTrustedApps: Enabled
      Versions: 10.0.17763.0, 10.0.18362.0, 10.0.19041.0, 10.0.22000.0
  IDEs:
    Android Studio: Not Found
    Visual Studio: 17.5.33502.453 (Visual Studio Enterprise 2022)
  Languages:
    Java: 11.0.16.1 - C:\Program Files\Microsoft\jdk-11.0.16.101-hotspot\bin\javac.EXE
  npmPackages:
    @react-native-community/cli: Not Found
    react: Not Found
    react-native: Not Found
    react-native-windows: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
Target Platform Version

10.0.19041

Target Device(s)

Desktop, Xbox, HoloLens

Visual Studio Version

Visual Studio 2022

Build Configuration

None

Snack, code example, screenshot, or link to a repository

See DynamicAutomationPeer and CompsositionDynamicAutomationProvider (in PR)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with vnext/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp and the referenced CompositionDynamicAutomationProvider implementation. Compare the alert and radiogroup mappings with the Core AAM UIA Control Types, then determine whether accessibilityRole or the newer role prop should carry the corrected behavior. Done means the chosen mapping is implemented consistently for Paper and Fabric, with the compatibility implications addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, react-native
Domain
accessibility
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.