@@ -3,13 +3,19 @@ import { configs, test } from '@utils/test/playwright';
33
44configs ( { modes : [ 'ios' ] , directions : [ 'ltr' ] } ) . forEach ( ( { title, screenshot, config } ) => {
55 test . describe ( title ( 'header: condense' ) , ( ) => {
6- test ( 'should be hidden from screen readers when collapsed' , async ( { page } ) => {
6+ test ( 'should hide small title from screen readers when collapsed' , async ( { page } ) => {
7+ test . info ( ) . annotations . push ( {
8+ type : 'issue' ,
9+ description : 'https://github.com/ionic-team/ionic-framework/issues/29347' ,
10+ } ) ;
11+
712 await page . goto ( '/src/components/header/test/condense' , config ) ;
813 const largeTitleHeader = page . locator ( '#largeTitleHeader' ) ;
914 const smallTitleHeader = page . locator ( '#smallTitleHeader' ) ;
15+ const smallTitle = smallTitleHeader . locator ( 'ion-title' ) ;
1016 const content = page . locator ( 'ion-content' ) ;
1117
12- await expect ( smallTitleHeader ) . toHaveAttribute ( 'aria-hidden' , 'true' ) ;
18+ await expect ( smallTitle ) . toHaveAttribute ( 'aria-hidden' , 'true' ) ;
1319
1420 await expect ( largeTitleHeader ) . toHaveScreenshot ( screenshot ( `header-condense-large-title-initial-diff` ) ) ;
1521
@@ -24,15 +30,15 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, c
2430 * Playwright can't do .not.toHaveAttribute() because a value is expected,
2531 * and toHaveAttribute can't accept a value of type null.
2632 */
27- const ariaHidden = await smallTitleHeader . getAttribute ( 'aria-hidden' ) ;
33+ const ariaHidden = await smallTitle . getAttribute ( 'aria-hidden' ) ;
2834 expect ( ariaHidden ) . toBeNull ( ) ;
2935
3036 await content . evaluate ( async ( el : HTMLIonContentElement ) => {
3137 await el . scrollToTop ( ) ;
3238 } ) ;
3339 await page . locator ( '#smallTitleHeader.header-collapse-condense-inactive' ) . waitFor ( ) ;
3440
35- await expect ( smallTitleHeader ) . toHaveAttribute ( 'aria-hidden' , 'true' ) ;
41+ await expect ( smallTitle ) . toHaveAttribute ( 'aria-hidden' , 'true' ) ;
3642 } ) ;
3743 } ) ;
3844} ) ;
0 commit comments