molecule · stable · app · since 2026-08
ConformityRate
Purpose
The conformity rate, said one way. It is the central figure of the product and it used to show five ways a few clicks apart. The bands are those of symboleDuTaux in @rgaa-dev/core, 75 and 50; the middle band stays in the ink because the standard has no “warning” colour and saying otherwise would lie.
When to use, when not
Use it wherever a rate is published: a page, a site, a campaign. When the audit cannot publish a rate, give null and the official sentence; never a rounded or provisional figure.
Anatomy
- The symbol of the band,
aria-hidden. - The figure, tabular numerals, with its percent sign.
- Optionally a suffix (“de conformité”).
- Or, when there is no rate, the reason in the soft ink.
Props
| Name | Type | Default | What it does |
|---|---|---|---|
rate | number | null | The rate in percent, or `null` when the audit cannot publish one. | |
unavailableReason? | string | null | null | What prevents publishing, word for word from the official grid. |
suffix? | string | '' | What the figure qualifies, read after it: "de conformité". |
decimals? | number | 0 | A site's average carries one decimal; a page's rate none. |
States
The three bands, the unavailable state with and without a reason, the decimal form for a site average.
average
Light
Dark
320 px, light
320 px, dark
216 px, light
Forced colours, captured
high
Light
Dark
320 px, light
320 px, dark
216 px, light
Forced colours, captured
low
Light
Dark
320 px, light
320 px, dark
216 px, light
Forced colours, captured
middle
Between 50 and 75 the ink stays neutral: neither a success nor a failure.
Light
Dark
320 px, light
320 px, dark
216 px, light
Forced colours, captured
unavailable
No figure while the audit is unfinished; the official sentence instead.
Light
Dark
320 px, light
320 px, dark
216 px, light
Forced colours, captured
unavailableBare
Light
Dark
320 px, light
320 px, dark
216 px, light
Forced colours, captured
Accessibility contract
- Role and name: text. The figure is a
b. - Keyboard, focus, live regions: none.
- The unavailable state is a sentence, never a dash.
Content rules
Percent with a non-breaking space before the sign, French decimal comma. The unavailable reason comes word for word from the official grid.
Do and don’t
- Do show the sentence when a criterion is still not tested.
- Do not compute a provisional rate and call it a conformity rate.
Examples
<ConformityRate rate={82} suffix="de conformité" />
<ConformityRate rate={null} unavailableReason="Audit inachevé : un critère reste non testé." /> Surfaces
- App: the dashboard, the site page, the audit page.
Related
StatusChip, Stat.
Decisions
- 2026-08: the thresholds live in core; this component only draws them.
- 2026-09-24: renamed from TauxDeConformite; the band is a modifier class, and the figure takes the decimal comma the doc always promised.
Criteria held by construction
- 3.1, Dans chaque page web, l'information ne doit pas être donnée uniquement par la couleur. Cette règle est-elle respectée ?
A symbol (● ◐ ○) says the band; the colour only confirms it.
Tokens it reads
- Colour:
--rl-c,--rl-ink,--rl-ink-soft,--rl-nc - Typography:
--rl-weight-bold