Skip to content

Conversation

@Ovgodd
Copy link
Collaborator

@Ovgodd Ovgodd commented Dec 3, 2025

Purpose

Fix AXE accessibility issues related to color contrast

contrasterror

@rl-83 I made a small adjusment to pass WCAG AA requirements, do you think it is ok for you ? the ratio was a bit low

Proposal

  • - Show AXE report: previous colors failed WCAG AA (contrast ratios were ~4.48–4.49, below the 4.5:1 threshold).
  • - Propose and implement color changes to meet WCAG AA requirements.
  • - Updated tertiary text colors:
  • - from --c--globals--colors--brand-500--c--globals--colors--brand-550
  • - from --c--globals--colors--gray-500--c--globals--colors--gray-550

@Ovgodd Ovgodd requested review from AntoLC and rl-83 December 3, 2025 13:38
@Ovgodd Ovgodd self-assigned this Dec 3, 2025
@Ovgodd Ovgodd added frontend needs design A UX/UI proposal is required to move forward accessibility labels Dec 3, 2025
@Ovgodd Ovgodd changed the title 💄(frontend) improve editor a11y and brand/neutral contrast ♿(frontend) improve editor a11y and brand/neutral contrast #1683 Dec 3, 2025
@Ovgodd Ovgodd changed the title ♿(frontend) improve editor a11y and brand/neutral contrast #1683 ♿(frontend) improve editor a11y and brand/neutral contrast Dec 3, 2025
@Ovgodd Ovgodd force-pushed the fix/a11y-axe-contrast-errors branch from af3194e to 6c511e1 Compare December 3, 2025 13:39
@Ovgodd Ovgodd marked this pull request as ready for review December 3, 2025 13:39
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Size Change: -2 B (0%)

Total Size: 4.11 MB

Filename Size Change
apps/impress/out/_next/static/css/1af729eeb6c19828.css 0 B -48.7 kB (removed) 🏆
apps/impress/out/_next/static/fa7e6e11/_buildManifest.js 0 B -906 B (removed) 🏆
apps/impress/out/_next/static/css/596fdb4eee2217d8.css 48.7 kB +48.7 kB (new file) 🆕
apps/impress/out/_next/static/de9edea3/_buildManifest.js 906 B +906 B (new file) 🆕

compressed-size-action

Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot update directly this file (https://github.com/suitenumerique/docs/blob/6c511e1854757d333a4ea6bf5f05b5cff00ea7c9/src/frontend/apps/impress/src/cunningham/cunningham-tokens.css), it is auto-generated.

To generate it we do yarn build-theme:

"build-theme": "cunningham -g css,ts -o src/cunningham --utility-classes && yarn prettier && yarn stylelint --fix",

If you want to modify colors it should be here:
https://github.com/suitenumerique/docs/blob/main/src/frontend/apps/impress/cunningham.ts

If the color modification is about the dsfr theme, the colors update chould be in the ui-kit repository, if it is in the generic theme, it should be on our side:

const genericTheme = {
generic: {
globals: {
colors: {
'brand-050': '#EEF1FA',
'brand-100': '#DDE2F5',
'brand-150': '#CED3F1',

adjust brand and neutral tertiary text colors to meet WCAG contrast ratio

Signed-off-by: Cyril <c.gromoff@gmail.com>
@Ovgodd Ovgodd force-pushed the fix/a11y-axe-contrast-errors branch from 6c511e1 to 81a1ea1 Compare December 4, 2025 11:03
@Ovgodd
Copy link
Collaborator Author

Ovgodd commented Dec 4, 2025

We cannot update directly this file (https://github.com/suitenumerique/docs/blob/6c511e1854757d333a4ea6bf5f05b5cff00ea7c9/src/frontend/apps/impress/src/cunningham/cunningham-tokens.css), it is auto-generated.

To generate it we do yarn build-theme:

"build-theme": "cunningham -g css,ts -o src/cunningham --utility-classes && yarn prettier && yarn stylelint --fix",

If you want to modify colors it should be here: https://github.com/suitenumerique/docs/blob/main/src/frontend/apps/impress/cunningham.ts

If the color modification is about the dsfr theme, the colors update chould be in the ui-kit repository, if it is in the generic theme, it should be on our side:

const genericTheme = {
generic: {
globals: {
colors: {
'brand-050': '#EEF1FA',
'brand-100': '#DDE2F5',
'brand-150': '#CED3F1',

Thanks again for the detailed explanation,

Just to confirm the approach on our side for the generic theme:
would you agree that the right fix is to slightly darken brand-500 (and possibly gray-500) in genericTheme.globals.colors in cunningham.ts, after aligning on the exact hex values with @rl-83, and then regenerate cunningham-tokens.css via yarn build-theme?

For the DSFR theme in the ui-kit repo, we seem to have a very similar contrast issue.
Once we’ve validated the new colors with Robin for the generic theme, I can open a follow‑up PR or an issue for the DSFR tokens

@Ovgodd Ovgodd marked this pull request as draft December 4, 2025 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility frontend needs design A UX/UI proposal is required to move forward

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants