Accessibility in Blazor Rating component

4 Nov 20254 minutes to read

The Blazor Rating 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 Rating component is outlined below.

Accessibility Criteria Compatibility
WCAG 2.2 Support Full support
Section 508 Support Full support
Screen Reader Support Full support
Right-To-left Support Full support
Color Contrast Full support
Mobile Device Support Full support
Keyboard Navigation Support Full support
Axe-core Accessibility Validation Full support
Full support - All features of the component meet the requirement.
Partial support - Some features of the component do not meet the requirement.
Not supported - The component does not meet the requirement.

WAI-ARIA attributes

The Blazor Rating component follows the WAI-ARIA slider pattern to meet accessibility requirements. The following ARIA attributes are used in the Blazor Rating component:

Attributes Purpose
role=slider Defines an input where the user selects a value from within a specified range.
role=button Indicates that the reset control is clickable and resets the rating to its minimum value.
aria-label Provides an accessible name for the Rating component.
aria-valuemin Defines the minimum rating value.
aria-valuemax Defines the maximum rating value.
aria-valuenow Announces the current rating value.
aria-hidden Hides the element from assistive technologies when present.

Keyboard interaction

The Blazor Rating component follows the keyboard interaction guideline, improving accessibility for people who use assistive technologies and those who rely on keyboard navigation. The following keyboard shortcuts are supported by the Blazor Rating component.

Windows Mac Actions
Space Space When the Reset button is focused, resets to the min value.
Increases the value.
Decreases the value; in right-to-left mode, increases the value.
Decreases the value.
Increases the value; in right-to-left mode, decreases the value.

Ensuring accessibility

The Blazor Rating component’s accessibility is verified using axe-core with Playwright tests.

The accessibility compliance of the Blazor Rating component is demonstrated in the following sample. Open the sample in a new window to evaluate the component with accessibility tools.

See also