diff --git a/core/src/components/item/item.tsx b/core/src/components/item/item.tsx index 859bd06aaae..48dff444e54 100644 --- a/core/src/components/item/item.tsx +++ b/core/src/components/item/item.tsx @@ -389,6 +389,7 @@ export class Item implements ComponentInterface, AnchorInterface, ButtonInterfac }); const ariaDisabled = disabled || childStyles['item-interactive-disabled'] ? 'true' : null; const fillValue = fill || 'none'; + const inList = hostContext('ion-list', this.el); return ( diff --git a/core/src/components/list/list.tsx b/core/src/components/list/list.tsx index 2c62050308d..11007ca269b 100644 --- a/core/src/components/list/list.tsx +++ b/core/src/components/list/list.tsx @@ -46,6 +46,7 @@ export class List implements ComponentInterface { const { lines, inset } = this; return ( + + + + List - a11y + + + + + + + + + +
+

List - a11y

+ + Item 1 + Item 2 + Item 3 + +
+ + diff --git a/core/src/components/list/test/a11y/list.e2e.ts b/core/src/components/list/test/a11y/list.e2e.ts new file mode 100644 index 00000000000..354e82f2ae6 --- /dev/null +++ b/core/src/components/list/test/a11y/list.e2e.ts @@ -0,0 +1,13 @@ +import AxeBuilder from '@axe-core/playwright'; +import { expect } from '@playwright/test'; +import { test } from '@utils/test/playwright'; + +test.describe('list: a11y', () => { + test('should not have accessibility violations', async ({ page }) => { + await page.goto(`/src/components/list/test/a11y`); + + const results = await new AxeBuilder({ page }).analyze(); + + expect(results.violations).toEqual([]); + }); +});