From 527015184e9413c1037277d3197bcaa33044c38c Mon Sep 17 00:00:00 2001 From: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com> Date: Mon, 29 Aug 2022 15:47:11 -0500 Subject: [PATCH] fix(action-sheet): add aria-labelledby (#25837) --- .../components/action-sheet/action-sheet.tsx | 12 ++-- .../test/a11y/action-sheet.e2e.ts | 57 ++++++++++++++++ .../action-sheet/test/a11y/index.html | 68 +++++++++++++++++++ 3 files changed, 132 insertions(+), 5 deletions(-) create mode 100644 core/src/components/action-sheet/test/a11y/action-sheet.e2e.ts create mode 100644 core/src/components/action-sheet/test/a11y/index.html diff --git a/core/src/components/action-sheet/action-sheet.tsx b/core/src/components/action-sheet/action-sheet.tsx index bf03534de4..5c1dcc2661 100644 --- a/core/src/components/action-sheet/action-sheet.tsx +++ b/core/src/components/action-sheet/action-sheet.tsx @@ -239,16 +239,18 @@ export class ActionSheet implements ComponentInterface, OverlayInterface { } render() { - const { htmlAttributes } = this; + const { header, htmlAttributes, overlayIndex } = this; const mode = getIonMode(this); const allButtons = this.getButtons(); const cancelButton = allButtons.find((b) => b.role === 'cancel'); const buttons = allButtons.filter((b) => b.role !== 'cancel'); + const headerID = `action-sheet-${overlayIndex}-header`; return ( -