From d9818ad881106388272d4a561575a4567ba6be54 Mon Sep 17 00:00:00 2001 From: Archana Chaurasiya Date: Thu, 26 Nov 2026 06:57:11 +0530 Subject: [PATCH] fix(content): make scroll area keyboard-focusable --- core/src/components/content/content.tsx | 1 + .../components/content/test/a11y/content.e2e.ts | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/core/src/components/content/content.tsx b/core/src/components/content/content.tsx index 0386847e86d..e76c09af1ad 100644 --- a/core/src/components/content/content.tsx +++ b/core/src/components/content/content.tsx @@ -618,6 +618,7 @@ export class Content implements ComponentInterface { }} ref={(scrollEl) => (this.scrollEl = scrollEl)} onScroll={this.scrollEvents ? (ev: UIEvent) => this.onScroll(ev) : undefined} + tabindex="0" part="scroll" > diff --git a/core/src/components/content/test/a11y/content.e2e.ts b/core/src/components/content/test/a11y/content.e2e.ts index 9a5e796d5fd..225e3fb70f3 100644 --- a/core/src/components/content/test/a11y/content.e2e.ts +++ b/core/src/components/content/test/a11y/content.e2e.ts @@ -63,5 +63,20 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { await expect(content).toHaveAttribute('role', 'complementary'); }); + + test('should make the scroll area keyboard-focusable', async ({ page }) => { + await page.setContent( + ` + +
Scrollable content
+
+ `, + config + ); + + const scrollArea = page.locator('ion-content [part="scroll"]'); + + await expect(scrollArea).toHaveAttribute('tabindex', '0'); + }); }); });