mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 00:27:21 +02:00
fix(website): fix multiple accessibility issues around color contrast (#7336)
* fix(website): darken breadcrumbs color to ensure contrast * fix lighthouse * fix more a11y * more fix
This commit is contained in:
parent
eea27aad68
commit
8f80f6c0b2
3 changed files with 22 additions and 5 deletions
|
@ -18,12 +18,12 @@ const summaryKeys = {
|
|||
pwa: 'PWA',
|
||||
};
|
||||
|
||||
/** @param {number} score */
|
||||
const scoreEntry = (score) => {
|
||||
const normalizedScore = Math.round(score * 100);
|
||||
/** @param {number} rawScore */
|
||||
const scoreEntry = (rawScore) => {
|
||||
const score = Math.round(rawScore * 100);
|
||||
// eslint-disable-next-line no-nested-ternary
|
||||
const scoreIcon = score >= 90 ? '🟢' : score >= 50 ? '🟠' : '🔴';
|
||||
return `${scoreIcon} ${normalizedScore}`;
|
||||
return `${scoreIcon} ${score}`;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue