From 075a2024c6003bf0553f282a0c73636e253a24a6 Mon Sep 17 00:00:00 2001 From: melloware Date: Mon, 6 Jan 2025 08:58:19 -0500 Subject: [PATCH] Fix #7343: Remove aria-hidden as not needed from focusable elements --- components/lib/dropdown/Dropdown.js | 5 +---- components/lib/multiselect/MultiSelectPanel.js | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/components/lib/dropdown/Dropdown.js b/components/lib/dropdown/Dropdown.js index 6e0c8098d2..dd8e53a298 100644 --- a/components/lib/dropdown/Dropdown.js +++ b/components/lib/dropdown/Dropdown.js @@ -985,8 +985,7 @@ export const Dropdown = React.memo( required: props.required, defaultValue: option.value, name: props.name, - tabIndex: -1, - 'aria-hidden': 'true' + tabIndex: -1 }, ptm('select') ); @@ -1198,7 +1197,6 @@ export const Dropdown = React.memo( { ref: firstHiddenFocusableElementOnOverlay, role: 'presentation', - 'aria-hidden': 'true', className: 'p-hidden-accessible p-hidden-focusable', tabIndex: '0', onFocus: onFirstHiddenFocus, @@ -1212,7 +1210,6 @@ export const Dropdown = React.memo( { ref: lastHiddenFocusableElementOnOverlay, role: 'presentation', - 'aria-hidden': 'true', className: 'p-hidden-accessible p-hidden-focusable', tabIndex: '0', onFocus: onLastHiddenFocus, diff --git a/components/lib/multiselect/MultiSelectPanel.js b/components/lib/multiselect/MultiSelectPanel.js index 5f5a7b4490..d0123372d8 100644 --- a/components/lib/multiselect/MultiSelectPanel.js +++ b/components/lib/multiselect/MultiSelectPanel.js @@ -298,7 +298,6 @@ export const MultiSelectPanel = React.memo( { ref: props.firstHiddenFocusableElementOnOverlay, role: 'presentation', - 'aria-hidden': 'true', className: 'p-hidden-accessible p-hidden-focusable', tabIndex: '0', onFocus: props.onFirstHiddenFocus, @@ -312,7 +311,6 @@ export const MultiSelectPanel = React.memo( { ref: props.lastHiddenFocusableElementOnOverlay, role: 'presentation', - 'aria-hidden': 'true', className: 'p-hidden-accessible p-hidden-focusable', tabIndex: '0', onFocus: props.onLastHiddenFocus,