Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fabric] Implement IRangeValueProvider and Adjust IValueProvider Implementation #14212

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

chiaramooney
Copy link
Contributor

@chiaramooney chiaramooney commented Dec 17, 2024

Description

Type of Change

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

Why

Implement IRangeValueProvider so developers can create custom controls which pass range data to UIA. Adjusted IValueProvider implementation. Now that IRangeValueProvider is supported, IValueProvider should not cover numerical data anymore.

Resolves #13351
Resolves #13328
Resolves #12510
#11905

What

  • Add support for IRangeValueProvider: Provider is implemented when a control has accessibilityValue={{min: X, max: Y, and now: Z}}
  • IValueProvider implemented if control is TextInput or if accessibilityValue={{text: X}}
  • accessibilityValue={{now: x}} -> RangeValueProvider.Value
  • accessibilityValue={{min: y}} -> RangeValueProvider.Minimum
  • accessibilityValue={{now: z}} -> RangeValueProvider.Maximum
  • accessibilityValue={{text: x}} -> ValueProvider.Value
  • If control is a TextInput, ValueProvider.Value = contents of TextInput
  • Added support for aria-readonly and accessibilityState={{readOnly: X}}
  • aria-readonly or accessibilityState={{readOnly: X}} -> RangeValueProvider.IsReadOnly (If RangeValueProvider implemented) or ValueProvider.IsReadOnly (if ValueProvider implemented), default to false

Note: UIA SetValue still cannot be implemented because of API restrictions with the onAccessibilityAction API. Issue has been filed upstream (See #)

Testing

Add a couple automated tests. Tested additional scenarios locally.

Changelog

Should this change be included in the release notes: Yes

Adds support for custom controls to pass range data to UIA via the IRangeValueProvider. Added support for aria-readonly and accessibilityState.readOnly

Microsoft Reviewers: Open in CodeFlow

@chiaramooney chiaramooney requested a review from a team as a code owner December 17, 2024 22:26
@microsoft-github-policy-service microsoft-github-policy-service bot added Area: Accessibility Area: Fabric Support Facebook Fabric Area: Slider Area: TextInput New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Accessibility Area: Fabric Support Facebook Fabric Area: Slider Area: TextInput New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric
Projects
None yet
1 participant