diff --git a/core/src/components/header/test/condense/header.e2e.ts b/core/src/components/header/test/condense/header.e2e.ts index 791c1b720af..b57d1ee58f7 100644 --- a/core/src/components/header/test/condense/header.e2e.ts +++ b/core/src/components/header/test/condense/header.e2e.ts @@ -3,13 +3,19 @@ import { configs, test } from '@utils/test/playwright'; configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => { test.describe(title('header: condense'), () => { - test('should be hidden from screen readers when collapsed', async ({ page }) => { + test('should hide small title from screen readers when collapsed', async ({ page }) => { + test.info().annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/29347', + }); + await page.goto('/src/components/header/test/condense', config); const largeTitleHeader = page.locator('#largeTitleHeader'); const smallTitleHeader = page.locator('#smallTitleHeader'); + const smallTitle = smallTitleHeader.locator('ion-title'); const content = page.locator('ion-content'); - await expect(smallTitleHeader).toHaveAttribute('aria-hidden', 'true'); + await expect(smallTitle).toHaveAttribute('aria-hidden', 'true'); await expect(largeTitleHeader).toHaveScreenshot(screenshot(`header-condense-large-title-initial-diff`)); @@ -24,7 +30,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, c * Playwright can't do .not.toHaveAttribute() because a value is expected, * and toHaveAttribute can't accept a value of type null. */ - const ariaHidden = await smallTitleHeader.getAttribute('aria-hidden'); + const ariaHidden = await smallTitle.getAttribute('aria-hidden'); expect(ariaHidden).toBeNull(); await content.evaluate(async (el: HTMLIonContentElement) => { @@ -32,7 +38,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, c }); await page.locator('#smallTitleHeader.header-collapse-condense-inactive').waitFor(); - await expect(smallTitleHeader).toHaveAttribute('aria-hidden', 'true'); + await expect(smallTitle).toHaveAttribute('aria-hidden', 'true'); }); }); });