From 1504b8888d6f79ea382935ed52b104b9f841d150 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 31 Oct 2022 14:02:09 -0500 Subject: [PATCH] fix(modal): buttons are highlighted with VoiceOver (#26180) resolves #26156 --- core/src/components/modal/modal.tsx | 20 ++++++++++++++----- .../components/modal/test/a11y/modal.e2e.ts | 4 ++-- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/core/src/components/modal/modal.tsx b/core/src/components/modal/modal.tsx index b4500948ed..804c803dc7 100644 --- a/core/src/components/modal/modal.tsx +++ b/core/src/components/modal/modal.tsx @@ -348,7 +348,7 @@ export class Modal implements ComponentInterface, OverlayInterface { componentWillLoad() { const { breakpoints, initialBreakpoint, swipeToClose, el } = this; - this.inheritedAttributes = inheritAttributes(el, ['role']); + this.inheritedAttributes = inheritAttributes(el, ['aria-label', 'role']); /** * If user has custom ID set then we should @@ -879,11 +879,8 @@ export class Modal implements ComponentInterface, OverlayInterface { return ( } -