stable

Clone or download

Read-only

feat: improve contrast for tests status

The combination of foreground and background colors in matrix table is not great, according to APCA[1] used in WCAG 3. The issue with previous colors is that WCAG 2 does not take into accound foreground/background. However in real life, swapping foreground and background colors differs and scoring should be different. Here are ACPA scoring with background color against black or white text: failed: e04b4b black: 38 white: 72 passed: 1aa350 black: 44 white: 65 blocked: 1aacd8 black: 53 white: 56 notrun: 717171 black: 30 white: 79 (The higher the better) In every cases, using white text is better than black text. With this commit we now use white text for every status instead of just `notrun`. If we look closely at the scores, we notice that there is still an issue with blocked status: 15: Minimum for non-text elements 30: Absolute min for any text 45: Min for large text (the old 3:1) 60: Min for body text (the old 4.5:1) 75: Preferred level for body text With a score of 56 (white on #1aacd8), we are below the minimum for body text. Unless using a different blue, there is no better alternative for now. Part of story #23462: export test plan as a docx document [1]: https://www.w3.org/WAI/GL/task-forces/silver/wiki/Visual_Contrast_of_Text_Subgroup/APCA_model Change-Id: I5249430c28ee26cdeb6d5080bff2d3afaf1cf47b

Modified Files

Name
M plugins/testplan/scripts/test-plan/src/helpers/ExportAsDocument/Exporter/DOCX/matrix-builder.ts +6 −7 Go to diff View file