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

Accessibility ComboBox bound to non string object causes Narrator to read class name rather than displayed value #17000

Open
ahopper opened this issue Sep 12, 2024 · 3 comments
Labels

Comments

@ahopper
Copy link
Contributor

ahopper commented Sep 12, 2024

Describe the bug

If a ComboBox is bound to a list of non string objects the Narrator screen reader will read the class name for the selected object. It correctly reads the displayed value for the items in the list once it is opened.
AvaloniaAccess.zip

To Reproduce

Run the sample on windows, start Narrator and tab to the ComboBox, it will read the class name for the selected value.

Expected behavior

Narrator to read the displayed value

Avalonia version

11.2.999-cibuild0051813-alpha

OS

Windows

Additional context

No response

@ahopper ahopper added the bug label Sep 12, 2024
@timunie
Copy link
Contributor

timunie commented Sep 12, 2024

Try to override ToString of that bound object

@ahopper
Copy link
Contributor Author

ahopper commented Sep 12, 2024

Try to override ToString of that bound object

That does make it work (and how I had worked around it), but I'm not sure it is how it should be, it seems odd that the text is read out for the dropdown list and not when the dropdown is closed. I just tested on WPF and it reads the class name for both cases. My feeling is it should use the displayed text, this might be different across multiple uses of the object and you have already defined the text you want with either a template or DisplayBemberBinding. Anything that makes Accessibility automatic seems good to me, but if this is expected behaviour so be it.

@timunie
Copy link
Contributor

timunie commented Sep 13, 2024

@ahopper I am not sure about automation. I feel like there is some room for optimization and your suggestion could be part of it. But in the end the experts needs to decide. I think following what WPF does if applicable would maybe be a good idea.

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

2 participants