Accessibility in Blazor Toast Component

26 Jun 20243 minutes to read

The Blazor Toast component has been designed with WAI-ARIA specifications in mind by applying the prompt WAI-ARIA roles, states, and properties with the keyboard support. It helps users who use assistive WAI-ARIA accessibility support, which is achieved using attributes.

It provides information about the elements in a document for assistive technology.

The Blazor Toast component implements the keyboard navigation support by using the following WAI-ARIA practices and is tested in major screen readers.

The Blazor Toast component followed the accessibility guidelines and standards, including ADA, Section 508, WCAG 2.2 standards, and WCAG roles that are commonly used to evaluate accessibility.

The accessibility compliance for the Blazor Toast component is outlined below.

Accessibility Criteria Compatibility
WCAG 2.2 Support Yes
Section 508 Support Yes
Screen Reader Support Yes
Right-To-Left Support Yes
Color Contrast Yes
Mobile Device Support Yes
Keyboard Navigation Support Not Applicable
Axe-core Accessibility Validation Yes
Yes - All features of the component meet the requirement.
Intermediate - Some features of the component do not meet the requirement.
No - The component does not meet the requirement.

WAI-ARIA attributes

It provides information about the elements in a document for assistive technology.

The Blazor Toast component implements the keyboard navigation support by using the following WAI-ARIA practices and is tested in major screen readers.

Class Description
role alert: Identifies the element as a container when alert content will be added or updated.
@using Syncfusion.Blazor.Notifications

<SfToast @ref="ToastObj" Title="Matt sent you a friend request" Content="@ToastContent" Timeout="0">
    <ToastEvents Created="@OnCreate"></ToastEvents>
</SfToast>

@code {
    SfToast ToastObj;

    private string ToastContent { get; set; } = "You have a new friend request yet to accept";

    private async Task OnCreate()
    {
       await this.ToastObj.ShowAsync();
    }
}

Accessibility in Blazor Toast

Ensuring accessibility

The Blazor Toast component’s accessibility levels are ensured through an axe-core software tool during automated testing.

The accessibility compliance of the Toast component is shown in the following sample. Open the sample in a new window to evaluate the accessibility of the Toast component with accessibility tools.

See also