Accessibility
IzzyBlazor builds on the browser's own elements, so keyboard, focus and screen readers work as the platform defines them, and the script adds ARIA only where it adds behavior. This page covers what the components do for you, and what's left to your app.
Native elements first
Buttons are button or a, dialogs are dialog, selects are
select, disclosures are details, and checkboxes, radios and switches are real inputs.
Enter, Space, Escape and the arrow keys do what people expect, with no script.
Where the script adds behavior, it adds the roles that go with it. Tabs are a radio group with JavaScript off and become ARIA tabs with roving focus once the script runs; a dialog opened by the server becomes a real modal. Each component's Overview says what changes in its Mode support table.
Names and labels
- Fields render a
labellinked to the control, and link their hint and errors witharia-describedby.HideLabelkeeps the label for screen readers when it isn't shown. - Anything shown only as an icon needs a name: IconButton's
Labelis required. - An Icon is hidden from screen readers unless you give it a
Label, so it never repeats the text beside it. - Image requires
Alt; passAlt=""for a picture that only decorates. - Components that hold a region, such as a table, a menu or pagination, take a
LabelorCaptionfor their name, with a default from IzzyText.
Keyboard and focus
- The focus ring shows for keyboard focus only, in the focus color (
--ib-color-focus, your brand color by default). - After a failed submit,
FormErrorstakes focus, with JavaScript off too, so people start from the list of problems. - Dialogs and drawers trap focus and return it to the trigger when they close; a popover opened by the user takes focus and gives it back.
- AppShell starts with a "Skip to content" link to the main area.
- When Blazor's
FocusOnNavigatemoves focus to the page's heading, or the skip link to the main area, no ring is drawn there: screen readers still announce it, and sighted users don't see a box they didn't ask for.
Announcements
- Danger and warning alerts are announced as soon as they appear; the others politely. A
Bannerisn't announced, since it's there when the page loads; setAnnouncewhen one appears later. - Toasts are read politely, and stay until dismissed when they're errors.
- A loading button sets
aria-busyand is heard as itsLoadingLabel; aSpinneris heard as itsLabel. - A table's "1–10 of 50" and a combobox's "No matches" are read when they change.
- A status, such as a badge's or an alert's, comes with an icon and words as well as a color, and screen readers hear its name.
Color and contrast
Text holds 4.5:1 on what it sits on, in light and dark (disabled text, as WCAG allows, is lighter), and a brand or gray color of your own is checked the same way. In Windows high-contrast mode, controls switch to the system's colors, and checkboxes and switches fall back to the browser's own. When you set colors yourself, see Tokens and customizing for the pairs to keep together.
Motion
With reduced motion set, dialogs, drawers, popovers, tooltips, disclosures, tabs and the sidebar stop moving, and spinners slow down rather than stop, since the motion says "still working". There's no page-wide reset, so your own animations are yours to handle.
With JavaScript off
Everything stays usable, but a few things are plainer: tabs are heard as radio buttons and a dialog opened by the server isn't modal. Each component's Overview lists what changes; see Render modes.
What's left to your app
- A
langon thehtmlelement, and aPageTitleon every page. - One
h1per page and headings in order;Heading'sSizechanges the look, not the level. - Link and button text that makes sense on its own, not "Click here".
- Alt text that says what a picture shows, and a unit in a field's label when it matters, as in "Price (USD)".
- Contrast for colors you set yourself, and testing with a keyboard and a screen reader.
Next steps
- Forms and validation: labels, hints and errors.
- All components: what each one does in each mode.