Getting started
Accessibility
How Cristal aims for a high level of RGAA compliance.
Our approach
- Native elements under the hood.
cr-buttoncontains a realbutton,cr-inputa realinput,cr-dialoga realdialog. Keyboard support, ARIA roles and mobile behavior come from the browser, not from a reimplementation. When no native element is rich enough, as for the select, Cristal follows the W3C patterns (ARIA Authoring Practices). - Required labels. Every field takes a
labelproperty, rendered and linked to the field by the component itself. - Announced hints and errors.
hintanderrorare linked to the field witharia-describedby; an error addsaria-invalid. - Explicit errors. Input errors are displayed automatically, in English by default or in French with
lang="fr", and say how to fix the problem; on submit, focus moves to the first invalid field. - Visible focus on every interactive element, with a contrast of at least 3:1.
- Reduced motion respected: if the user asked for it, menu and list animations become a simple fade, and the loading indicator slows down.
- Windows high contrast mode (forced colors) supported.
Automated tests
Every change goes through browser tests (Playwright) that check the keyboard, forms, dialog focus, and an axe WCAG 2.1 AA audit of the page, with dialogs closed and open.
An automated audit detects about a third of accessibility issues. RGAA compliance also requires manual checking, especially with a screen reader.
What remains your responsibility
- A consistent heading hierarchy in your pages.
- Explicit button texts ("Delete product" rather than "OK").
- An
aria-labelon standalone icons, andaria-hidden="true"on decorative icons. - Contrasts, if you change the theme colors.
Known limitations
- No "danger" button variant yet.