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
21.83k stars 1.67k forks source link

Voiceover is not announced "item added or updated" when user is adding or editing a new Recipe or existing Recipe: A11y_.NET Core_Recipes App My Recipes Edit_Edit Recipe_Screen reader. #23001

Open keerthiduvvuri opened 3 weeks ago

keerthiduvvuri commented 3 weeks ago

GIT Hub Tags:

AI Limited; #A11yTCS; #A11ySev2; #.NET Core; #E2E-.NET Core-IOS-MAUI-JUNE2024; #Voiceover; #IOS; #WCAG1.3.1; #Info and Relationship; #FTP; #A11yMAS; #ScreenReader; #Elemet: Screenreader;

Environment and OS details:

IOS Version 17

Reproduction Steps

  1. Install and open ".NET MAUI" app.
  2. Swipe to "My Recipes" and double tap.
  3. Swipe to any existing recipe and double tap.
  4. "Recipe" Screen will open.
  5. Swipe to "Edit" button and double tap.
  6. Verify all the controls in the "Edit recipe" are accessible and MAS Compliant.
  7. Enter text in all entry fields.
  8. Save recipe.
  9. Observe that Voiceover is not announced "item added or updated" when user is adding or editing a new Recipe or existing Recipe.

Actual behavior:

Voiceover is not announced "item added or updated" when user is adding or editing a new Recipe or existing Recipe.

Expected behavior

Voiceover should be announced "item added or updated" when user is adding or editing a new Recipe or existing Recipe.

User Impact:

Screen reader users will face difficulty if Voiceover is not announced "item added or updated" when user is adding or editing a new Recipe or existing Recipe.

Attachments:

https://github.com/dotnet/maui/assets/98728920/6281b667-3e49-4afe-b736-b2dcf7087716

https://github.com/dotnet/maui/assets/98728920/11a89429-4e98-4980-92e1-d4be256038fc

github-actions[bot] commented 3 weeks ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

RoiChen001 commented 3 weeks ago

Can repro this issue at Android platform on the latest 17.6.12(build 410)(8.0.21&8.0.40).

keerthiduvvuri commented 2 weeks ago

@RoiChen001 sorry i have changed back to IOS, the bug is in IOS platform.

Yash14j commented 2 weeks ago

GithubTags:#Rev:yaja;

tj-devel709 commented 1 day ago

I have verified this behaves as stated above.

I wonder if the issue is the timing with the await Shell.Current.GoToAsync(".."); right after the SemanticScreenReader.Announce(RecipeName + " recipe added."); call.

If I remove the GoToAsync call, the full announcement is made.

Not sure how manageable this would be, but perhaps adding an async Announce method could be worth trying here:

namespace Microsoft.Maui.Essentials
{
    public static partial class SemanticScreenReader
    {
        public static async Task Announce(string text)
        {
            if (!UIAccessibility.IsVoiceOverRunning)
                return;

            var tcs = new TaskCompletionSource<bool>();

            MainThread.BeginInvokeOnMainThread(async () =>
            {
                await Task.Delay(100);
                UIAccessibility.PostNotification(UIAccessibilityPostNotification.Announcement, new NSString(text));
                // Adding some way of knowing/guessing when the Notification is finished reading?
                tcs.SetResult(true);
            });

            await tcs.Task;
        }
    }
}

Worth noting that there were timing issues with iOS Screenreader here: https://github.com/dotnet/maui/issues/3736

tj-devel709 commented 1 day ago

There is also an interesting workaround here: https://stackoverflow.com/a/59329208

Perhaps a little tricky but has potential!