File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ for (let i = 0; i < inputs.length; i++) {
1111 }
1212
1313 // Break the #rrggbb color code into RGB components.
14- color = parseInt ( element . value . substr ( 1 ) , 16 ) ;
14+ color = Number . parseInt ( element . value . substr ( 1 ) , 16 ) ;
1515 red = ( ( color & 0xff0000 ) >> 16 ) / 255 ;
1616 green = ( ( color & 0x00ff00 ) >> 8 ) / 255 ;
1717 blue = ( color & 0x0000ff ) / 255 ;
@@ -34,11 +34,7 @@ for (let i = 0; i < inputs.length; i++) {
3434 // Complain if we're below WCAG 2.2 recommendations.
3535 if ( contrast < 4.5 ) {
3636 element . setCustomValidity (
37- "Consider choosing a darker color. " +
38- "(Tag text is small and white.)\n\n" +
39- "Contrast ratio: " +
40- Math . trunc ( contrast * 10 ) / 10 +
41- " (< 4.5)" ,
37+ `Consider choosing a darker color. (Tag text is small and white.)\n\nContrast ratio: ${ Math . trunc ( contrast * 10 ) / 10 } (< 4.5)` ,
4238 ) ;
4339
4440 // The admin form uses novalidate, so manually display the browser's
You can’t perform that action at this time.
0 commit comments