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

Blazor Desktop tenets: Accessibility #2541

Closed
Eilon opened this issue Feb 27, 2021 · 3 comments
Closed

Blazor Desktop tenets: Accessibility #2541

Eilon opened this issue Feb 27, 2021 · 3 comments
Assignees
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView discussed Created by mkArtakMSFT to help with planning temporarily. It will be removed after planning is done. Priority:1 Created by mkArtakMSFT
Milestone

Comments

@Eilon
Copy link
Member

Eilon commented Feb 27, 2021

  • Check compatibility with screen readers
  • Check keyboard navigation such as tab key into and out of the WebView
  • Check automation metadata, e.g. AutomationAttribute in WPF
  • Need to review guidance from docs of each native WebView component for any best practices
@ghost
Copy link

ghost commented Mar 1, 2021

Thanks for contacting us.
We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We will evaluate the request when we are planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@Eilon Eilon transferred this issue from dotnet/aspnetcore Sep 16, 2021
@Eilon Eilon added the area-blazor Blazor Hybrid / Desktop, BlazorWebView label Sep 16, 2021
@mkArtakMSFT mkArtakMSFT added this to the .NET 7 milestone Feb 23, 2022
@mkArtakMSFT mkArtakMSFT added the discussed Created by mkArtakMSFT to help with planning temporarily. It will be removed after planning is done. label May 4, 2022
@mkArtakMSFT mkArtakMSFT added the Priority:1 Created by mkArtakMSFT label May 12, 2022
@mkArtakMSFT mkArtakMSFT modified the milestones: .NET 7, 6.0.3xx-sr2 May 25, 2022
@MackinnonBuck
Copy link
Member

MackinnonBuck commented Jun 17, 2022

@Eilon @mkArtakMSFT I've investigated each of the items above and documented my findings below.

Check compatibility with screen readers

The BlazorWebView control in MAUI, WPF, and Windows Forms respects accessibility attributes like aria-label (the screen reader reads the label value).

Check keyboard navigation

Following is the behavior exhibited by each platform:

  • The BlazorWebView WPF control respects TabIndex and IsTabStop as of BlazorWebView WPF tab navigation improvements #7742.
  • The BlazorWebView Windows Forms control also respects TabIndex and IsTabStop. However, when shift+tabbing backwards out of the WebView, focus loops back around to the last element in the WebView. I spent a few minutes investigating this, and there doesn't seem to be an obvious reason why it happens, so further investigation is necessary. Tabbing forward out of the view works as expected.
  • The BlazorWebView MAUI control does not support TabIndex and IsTabStop because those properties have been removed from MAUI: [Spec] Remove TabIndex and IsTabStop properties #1646. However, the WebView contents do respect the HTML tabindex attribute and tab navigation works as expected.

Check automation metadata

Using Accessibility Insights for Windows, we see automation properties appear to be correctly populated for elements in the BlazorWebView. I've verified this in MAUI, WPF, and Windows Forms. Here's a screenshot of the automation properties for a button in a WPF BlazorWebView:

wpf_automation_properties

The same automation properties are discovered on the other platforms.

Review WebView2 component guidance

The WebView2 developer guide contains general usage guidance that I've reviewed and assessed. However, after evaluating each of the items mentioned in that article, I realized that none of them had significant accessibility implications. It may still be useful to review these findings offline, but I've left them out of this comment to not distract from the purpose of this issue.

Next steps

  • Determine if the Windows Forms BlazorWebView backwards tab navigation behavior is a bug that deserves its own tracking issue. Update: Issue created here
  • Review findings relating to WebView2 usage that don't have direct accessibility implications.

@MackinnonBuck
Copy link
Member

Closing this issue, as follow-up items relating to the original issue comment have been addressed.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView discussed Created by mkArtakMSFT to help with planning temporarily. It will be removed after planning is done. Priority:1 Created by mkArtakMSFT
Projects
None yet
Development

No branches or pull requests

3 participants