From a43ecf86a853216c56bef23d6e4db500fc5480a9 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Tue, 22 Aug 2023 16:45:14 -0700 Subject: [PATCH] Prevent accessible name conflicts on action menu Signed-off-by: Christopher Ng (cherry picked from commit 17465a3b4b48b84c91efdb055cee6174f80c4305) --- src/components/NcActions/NcActions.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/NcActions/NcActions.vue b/src/components/NcActions/NcActions.vue index c02279cb29..2d1b5247ec 100644 --- a/src/components/NcActions/NcActions.vue +++ b/src/components/NcActions/NcActions.vue @@ -659,7 +659,11 @@ export default { }, /** - * Aria label for the actions menu + * Aria label for the actions menu. + * + * If `menuName` is defined this will not be used to prevent + * any accessible name conflicts. This ensures that the + * element can be activated via voice input. */ ariaLabel: { type: String, @@ -1104,7 +1108,7 @@ export default { ref: 'menuButton', attrs: { 'aria-haspopup': isNav ? null : 'menu', - 'aria-label': this.ariaLabel, + 'aria-label': this.menuName ? null : this.ariaLabel, 'aria-controls': this.opened ? this.randomId : null, 'aria-expanded': this.opened.toString(), },