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

fix: Accessibility issue in FluentButton #2671

Open
efinder2 opened this issue Sep 17, 2024 · 1 comment
Open

fix: Accessibility issue in FluentButton #2671

efinder2 opened this issue Sep 17, 2024 · 1 comment
Labels
a11y Accessibillity status:needs-investigation Needs additional investigation

Comments

@efinder2
Copy link

efinder2 commented Sep 17, 2024

🐛 Bug Report

In contrast to the "pure" FluentUI the output of screen readers is wrong. I tested with NVDA and Windows Narrator.

English isn't my native language so be aware of some issues.

💻 Repro or Code Sample

When using a screen reader the Type Button is read multiple times. I tested it with Microsoft Narrator and NVDA.
The following example is from the "Loading" Button on the Blazor FluentUi example page.

image

🤔 Expected Behavior

The expected Behavior the following text:

German:
Schalter    anklickbar  Loading

English:
Button clickable Loading

😯 Current Behavior

Cause my PC is configured to use german it isn't easy to switch NVDA to englisch. So here is the german output from the NVDA logger. For better understanding I translated it to english:

German:
Schalter    anklickbar
Schalter    anklickbar  Loading
Schalter    anklickbar

English:
Button clickable
Button clickable Loading
Button clickable

💁 Possible Solution

I don't know if this is a specific FluentUI Blazor problem or from FluentUI itself. If the type="button" is defined for the <fluent-button> it is rendered into the generated button. So there are a type=button in a button from type="button". This wrapped structure causes the described problem. The default value for the parameter Type is ButtonType.Button. so there is no way to remove the value.

Our workaround is to set an aria-label for the button so the complete Content isn't read. This is not ideal because changes to the content must be reflected in the content and the label. There is a risk a developer miss it when they change it.

🔦 Context

There are some laws requiring accessibility of UIs. So this is an important point.

🌍 Your Environment

OS: Windows 10
Browser: Edge, Chrome, Firefox
Screenreader: NVDA 2023.3.3, Windows Narrator for Windows 10
FluentUI 4.9.3
.NET 8

@microsoft-github-policy-service microsoft-github-policy-service bot added the triage New issue. Needs to be looked at label Sep 17, 2024
@vnbaaij vnbaaij added status:needs-investigation Needs additional investigation a11y Accessibillity and removed triage New issue. Needs to be looked at labels Sep 17, 2024
@vnbaaij
Copy link
Collaborator

vnbaaij commented Sep 17, 2024

I don't get the same when using Narrator. For me it announces:

Colored: Example Tab panel -> button -> Colored
Loading: button -> Fluent UI Blazor components

These components are being used in the Aspire Dashboard and that has been tested vigorously on a11y.

The loading button is a bit of an odd one out as we have made some changes in comparison to the other buttons. I'll take a closer look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Accessibillity status:needs-investigation Needs additional investigation
Projects
None yet
Development

No branches or pull requests

2 participants