@@ -14,7 +14,7 @@ describe('WCAG Compliance', () => {
1414 * exception applies. This test intentionally checks only the simple minimum-size case and
1515 * does not attempt to model the spacing exception.
1616 */
17- test . only ( '@wip touch targets are at least 24x24 pixels' , async ( { page : playwrightPage } ) => {
17+ test . only ( '@ready touch targets are at least 24x24 pixels' , async ( { page : playwrightPage } ) => {
1818 const page = await BasePage . init ( playwrightPage )
1919
2020 for ( const url of pages ) {
@@ -75,23 +75,25 @@ describe('WCAG Compliance', () => {
7575 */
7676 test ( '@ready text has sufficient color contrast' , async ( { page : playwrightPage } ) => {
7777 const page = await BasePage . init ( playwrightPage )
78- await page . goto ( '/' )
79-
80- // Sample a few text elements
81- const paragraphs = page . locator ( 'p' ) . first ( )
82- const hasVisibleText = await paragraphs . isVisible ( )
83-
84- if ( hasVisibleText ) {
85- const contrast = await paragraphs . evaluate ( ( el ) => {
86- const styles = window . getComputedStyle ( el )
87- return {
88- color : styles . color ,
89- backgroundColor : styles . backgroundColor ,
90- }
91- } )
78+ for ( const url of pages ) {
79+ await page . goto ( url )
80+
81+ // Sample a few text elements
82+ const paragraphs = page . locator ( 'p' ) . first ( )
83+ const hasVisibleText = await paragraphs . isVisible ( )
84+
85+ if ( hasVisibleText ) {
86+ const contrast = await paragraphs . evaluate ( ( el ) => {
87+ const styles = window . getComputedStyle ( el )
88+ return {
89+ color : styles . color ,
90+ backgroundColor : styles . backgroundColor ,
91+ }
92+ } )
9293
93- // Basic check that colors are defined
94- expect ( contrast . color ) . toBeTruthy ( )
94+ // Basic check that colors are defined
95+ expect ( contrast . color ) . toBeTruthy ( )
96+ }
9597 }
9698 } )
9799
0 commit comments