Skip to Content
Cristal

Getting started

Accessibility

How Cristal aims for a high level of RGAA compliance.

Our approach

  • Native elements under the hood. cr-button contains a real button, cr-input a real input, cr-dialog a real dialog. 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 label property, rendered and linked to the field by the component itself.
  • Announced hints and errors. hint and error are linked to the field with aria-describedby; an error adds aria-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-label on standalone icons, and aria-hidden="true" on decorative icons.
  • Contrasts, if you change the theme colors.

Known limitations

  • No "danger" button variant yet.

On this page