Skip to content

Commit 2ddfdac

Browse files
authored
Fix accessibility issue #9165 on color contrast ratio (#1270)
## References - github/accessibility-audits#9165 ## What This pull request includes change to the `src/theme.js` file to fix an accessibility issue related to color contrast ratio between `npm link` text #cb0000 and `surrounding text` #1f2328 ## Why If the link has no distinct style (such as underline) and luminosity contrast of the link has insufficient contrast ratio with the surrounding text. As a result, users with low vision who experience low contrast cannot detect visually that the text is intended to function as a link. ## Accessibility improvements: - [`src/theme.js`](https://github.com/npm/documentation/pull/1270/files#diff-09ce39aad75bba2010ea6e7fb785187ec76b341be11d5f7f2cc6b83839a1b728): Changed the `npm theme` color from `#cb0000` to `#cb3837 ` to meet the minimum contrast 3:1 ![image](https://github.com/user-attachments/assets/ba2ed776-e069-4776-ae62-ab78a7369f8a)
1 parent 89e44a5 commit 2ddfdac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/theme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react'
22
import {ThemeProvider as Provider, theme, Box} from '@primer/react'
33
import deepmerge from 'deepmerge'
44

5-
export const NPM_RED = '#cb0000'
5+
export const NPM_RED = '#cb3837'
66

77
export const npmTheme = deepmerge(theme, {
88
colors: {

0 commit comments

Comments
 (0)