dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22k stars 1.72k forks source link

Android native dialog accessibility #24749

Open IeuanWalker opened 4 days ago

IeuanWalker commented 4 days ago

Description

Hi, through testing our app with the screenreader, we noticed 1 main issue with native dialogs, hoping there is a workaround or fix that can be applied.

When native dialogs are opened the user's semantic focus isn't moved to the dialogs titles.

Dialogs include -

Atm when a dialog is opened it starts to read out the title, then when the user swipes it then focuses on the title and reads it out again, would be nicer if it just focuses straight on the title.

It's not bad for accessibility/ deal breaker, would just make the experience nicer.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.40 SR5

Is this a regression from previous behavior?

No, this is something new, Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

mattleibow commented 4 days ago

@rachelkang thoughts?

rachelkang commented 4 days ago

I just tested the DisplayAlert on both .NET MAUI 8.0.40 and native Android and the behavior appears to be consistent. I'm using a Google Pixel 4a, Android 13.

In both scenarios, when the DisplayAlert is opened, TalkBack reads the DisplayAlert title and then the text, and the focus is on the body of the DisplayAlert's text the entire time. It appears that this it the expected behavior on Android, which we align with.

If you find that this happens to be a bug with Android or if you believe I am missing additional context, please do share more information with us!

IeuanWalker commented 4 days ago

@rachelkang That's not the experience on my test device -

https://github.com/user-attachments/assets/b85a7413-0fb5-4ad4-8cd2-16058fa6777e

You can see in the first part of the vid both an alert and actionsheet behaviour the same, and don't focus on anything, just reads out the title, then swiping navigates to the title and it reads it out again

At the end of a vid I show a custom popup using Mopups, where I set the focus to the title, which is what I expect the dialogs to do.

My test device is -

rachelkang commented 4 days ago

Hmm that's certainly strange / not what I'm seeing on a blank .NET MAUI app with just a DisplayAlert. Could you please share a repro sample so the team can take a closer look and investigate further?

IeuanWalker commented 4 days ago

@rachelkang no prob, will take a look monday

dotnet-policy-service[bot] commented 4 days ago

Hi @IeuanWalker. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

mattleibow commented 3 days ago

@IeuanWalker can you try on Android 13 or a newer device. I wonder if there is a bug with Samsung OS or the older Android device.

dotnet-policy-service[bot] commented 3 days ago

Hi @IeuanWalker. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.