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
22.26k stars 1.76k forks source link

Role "Button" is not announced by VoiceOver for every Span that has a GestureRecognizer #25764

Open ChristopherStephan opened 1 week ago

ChristopherStephan commented 1 week ago

Description

When having a Label with multiple Spans that have a GestureRecognizer attached, the screen reader VoiceOver from iOS will not announce the role "Button" for every Span. It will only announce the role "Button" once.

<Label>
    <Label.FormattedText>
        <FormattedString>
            <Span Text="By selecting 'Agree and get started', you agree to our " />
            <Span Text="End User License Agreement"
                    TextDecorations="Underline">
                <Span.GestureRecognizers>
                    <TapGestureRecognizer Command="{Binding TapCommand}"
                                            CommandParameter="https://learn.microsoft.com/dotnet/maui/"
                                            />
                </Span.GestureRecognizers>
            </Span>
            <Span Text=" and acknowledge the " />
            <Span Text="Privacy Policy"
                    TextDecorations="Underline">
                <Span.GestureRecognizers>
                    <TapGestureRecognizer Command="{Binding TapCommand}"
                                            CommandParameter="https://learn.microsoft.com/dotnet/maui/" />
                </Span.GestureRecognizers>
            </Span>
        </FormattedString>
    </Label.FormattedText>
</Label>

Actual outcome: "By selecting 'Agree and get started', you agree to our End User License Agreement and acknowledge the Privacy Policy. Button" Expected outcome: "By selecting 'Agree and get started', you agree to our End User License Agreement Button and acknowledge the Privacy Policy. Button"

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?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

similar-issues-ai[bot] commented 1 week ago

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.