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

[Bug]: Accessibility properties SizeOfSet and PositionOfSet are not being set when using <ReactiveWindow> #3637

Open
hicks86 opened this issue Oct 2, 2023 · 6 comments
Labels

Comments

@hicks86
Copy link

hicks86 commented Oct 2, 2023

Describe the bug 🐞

As a part of our development process we run Microsoft's Accessibility Insights FastPass tool to ensure that UI changes are meeting this accessibility standard.

There is one issue that we cannot seem to resolve, and it seems to be linked to someting weird going on behind the scenes of ReactiveUI (from what I can tell).
When binding a list to a ComboBox using ReactiveUI there seems to be an issue that is being flagged by the tool around the values of the AutomationProperties.SizeOfSet and AutomationProperties.PositionOfSet. As of .NET48 these values should be automatically filled in in a WPF application. These values are used by a screenreader to inform the user where they are on a particular page (e.g. position 4 of 10).
Anyways when binding a list to a ComboBox using a regular WPF code behind binding (and just using instead of ) this is no longer an issue on the accessibility tool.

Step to reproduce

  1. Go to the reproduction and start the application
  2. Using Microsoft's Accessibility Insights FastPass tool run a test on the combobox.
  3. You will see the accessibility issue ** "The elements ControlType requires valid values for SizeOfSet and PositionOfSet"**
  4. Then swap to use a classic WPF code-behind approach to binding list to a combobox (Swap <ReactiveWindow> for <Window>, uncomment the WpfCombobox.ItemSource = ... code and comment out the ReactuveUI setup).
  5. Run the FastPass tool again.
  6. You will see there are no accessibility issues.

Reproduction repository

https://github.com/hicks86/ReactiveUIAccessibilityRepro

Expected behavior

When you run the accessibility tool there should be no accessibility issue present for the SizeOfSet and PositionOfSet AutomationProperties.

Screenshots 🖼️

No response

IDE

Visual Studio 2022

Operating system

Windows 10

Version

No response

Device

No response

ReactiveUI Version

19.4.1

Additional information ℹ️

Happy to provide any other information needed. It would be good to get to the bottom of this.

@hicks86 hicks86 added the bug label Oct 2, 2023
@glennawatson
Copy link
Contributor

Did you mean for this issue to be raised about the rxui website or rxui itself?

@hicks86
Copy link
Author

hicks86 commented Oct 2, 2023

Apologies I meant for rxui. Shall I recreate the ticket?

@ChrisPulman ChrisPulman transferred this issue from reactiveui/website Oct 2, 2023
@hicks86
Copy link
Author

hicks86 commented Oct 26, 2023

Anyone had a chance to look at this? Or provide some comments? Cheers

@ChrisPulman
Copy link
Member

I have been travelling for the past few weeks but should have some time available this weekend to take a look at this and some of the other recent observations raised.
Thank you for your patience.

@hicks86
Copy link
Author

hicks86 commented Oct 26, 2023

Thank you Chris.

@glennawatson
Copy link
Contributor

I have a strong suspicion it's the way we handle ItemsSource overwriting the way these automatic properties are set.

var viewProperties = getCurrentViewProperties();

When doing binding we will use a IPropertyBindingHook to look up from the view resolution and find the appropriate value to show.

I'm going to test this weekend and override the IPropertyBindingHook in the splat registrations with a custom one to see if its related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants