From 6ee4dfe5df48f540eb48bfced38d7b9b62f4685c Mon Sep 17 00:00:00 2001 From: amandaesmith3 Date: Fri, 26 Aug 2022 14:31:59 -0500 Subject: [PATCH 1/2] fix(action-sheet): add aria-labelledby --- .../components/action-sheet/action-sheet.tsx | 12 ++-- .../test/a11y/action-sheet.e2e.ts | 54 +++++++++++++++ .../action-sheet/test/a11y/index.html | 68 +++++++++++++++++++ 3 files changed, 129 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 bf03534de42..5c1dcc26617 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 ( -