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:
Joshua Chen 2022-05-05 15:29:27 +08:00 committed by GitHub
parent eea27aad68
commit 8f80f6c0b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 5 deletions

View file

@ -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}`;
};
/**