Skip to content

Commit 5c6426e

Browse files
committed
test: reword diff contrast test comments
Assisted-by: Claude:Opus-4.8
1 parent 1ac044a commit 5c6426e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

web_src/js/utils/theme-contrast.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ extend([a11yPlugin]); // adds the WCAG-correct colord().contrast()
77

88
type CssVariables = Record<string, string>;
99

10-
// The diff stat counters match GitHub, which renders them around 5:1; issue #37448 asks for >= 5.
10+
// Diff stat counters are short glanceable labels; issue #37448 asks for a contrast ratio of >= 5.
1111
const diffStatMinContrast = 5;
1212
// Function/type names are code read continuously, so keep the pre-1.26 AAA level.
1313
const syntaxNameMinContrast = 7;
@@ -28,7 +28,7 @@ function expectMinContrast(label: string, foreground: string, background: string
2828
expect(colord(foreground).contrast(background), label).toBeGreaterThanOrEqual(min);
2929
}
3030

31-
test('dark diff stat colors meet the GitHub-parity contrast floor', async () => {
31+
test('dark diff stat colors meet the minimum contrast floor', async () => {
3232
const darkVariables = await loadThemeVariables('theme-gitea-dark.css');
3333
const colorblindVariables = await loadThemeVariables('theme-gitea-dark-protanopia-deuteranopia.css', darkVariables);
3434
const tritanopiaVariables = await loadThemeVariables('theme-gitea-dark-tritanopia.css', darkVariables);

0 commit comments

Comments
 (0)