mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-21 13:34:04 +03:00
fix(Color Contrast Checker): fix pass/fail for text sizes
This commit is contained in:
1 parent
9750ac5cea
commit
b44367f3e8
1 file changed
+4
-4
@@ -31,10 +31,10 @@ const result = computed(() => {
|
|||||||
const wcagLevel = wcagContrastValue(bgHex, fgHex);
|
const wcagLevel = wcagContrastValue(bgHex, fgHex);
|
||||||
return {
|
return {
|
||||||
wcag21ConstrastValue: wcagLevel,
|
wcag21ConstrastValue: wcagLevel,
|
||||||
aaNormal: wcag(bgHex, fgHex, { level: 'AA', size: 'normal' }),
|
aaNormal: wcag(bgHex, fgHex, { level: 'AA', size: 'normal' }).pass,
|
||||||
aaaNormal: wcag(bgHex, fgHex, { level: 'AAA', size: 'normal' }),
|
aaaNormal: wcag(bgHex, fgHex, { level: 'AAA', size: 'normal' }).pass,
|
||||||
aaLarge: wcag(bgHex, fgHex, { level: 'AA', size: 'large' }),
|
aaLarge: wcag(bgHex, fgHex, { level: 'AA', size: 'large' }).pass,
|
||||||
aaaLarge: wcag(bgHex, fgHex, { level: 'AAA', size: 'large' }),
|
aaaLarge: wcag(bgHex, fgHex, { level: 'AAA', size: 'large' }).pass,
|
||||||
level: levels.find(l => wcagLevel < l.score),
|
level: levels.find(l => wcagLevel < l.score),
|
||||||
largeLevel: largeLevels.find(l => wcagLevel < l.score),
|
largeLevel: largeLevels.find(l => wcagLevel < l.score),
|
||||||
smallLevel: smallLevels.find(l => wcagLevel < l.score),
|
smallLevel: smallLevels.find(l => wcagLevel < l.score),
|
||||||
|
|||||||
Reference in new issue
Block a user