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 CRUD scaffolding should include correct ARIA roles and attributes #2891

Open
MackinnonBuck opened this issue Jul 24, 2024 · 2 comments

Comments

@MackinnonBuck
Copy link
Member

MackinnonBuck commented Jul 24, 2024

Overview

The "Create.razor" template (defined here and here) should generate ARIA roles/attributes for compatibility with screen readers.

There are currently two known accessibility issues with this template:

  1. Screen readers don't announce when a field is required
  2. Screen readers don't announce when a value for a required field is not provided

Proposed fixes

  1. Conditionally add the aria-required="true" HTML attribute here if the associated model property is annotated with a RequiredAttribute
  2. Add role="alert" to the <ValidationSummary /> here

Update: The same changes should also be applied to the Edit page.

@mkArtakMSFT
Copy link
Member

Thanks @MackinnonBuck.
@vijayrkn this is accessibility related so it has to be fixed by .NET 9 GA. Mackinnon has provided the content above. Can you handle this from here please?

@deepchoudhery
Copy link
Member

Yep should be done for .NET 9 GA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants