Skip to content

[0.77][Fabric] Implement IRangeValueProvider and Adjust IValueProvider Implementation #14421

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

Merged
merged 2 commits into from
Mar 12, 2025

Conversation

chiaramooney
Copy link
Contributor

@chiaramooney chiaramooney commented Mar 12, 2025

Description

Type of Change

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

Why

Backport #14212 to 0.77

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
Microsoft Reviewers: Open in CodeFlow

…ementation (microsoft#14212)

* IRangeValue Provider

* Adjust ReadOnly to Use Prop Value

* Complete IRangeValueProvider Implementation

* Change files

* Update Snapshots
@chiaramooney chiaramooney requested a review from a team as a code owner March 12, 2025 18:55
@chiaramooney chiaramooney merged commit ef8b692 into microsoft:0.77-stable Mar 12, 2025
102 checks passed
@chiaramooney chiaramooney deleted the cm-value-77 branch March 12, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants