From 4c27e6ebfeb9bb78625c1b318ce1cb44653d562f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Tue, 10 Dec 2024 08:47:37 +0100 Subject: [PATCH] Fixing accessiblity on search input (#29423) Automatic Merge --- webapp/channels/src/components/new_search/new_search.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webapp/channels/src/components/new_search/new_search.tsx b/webapp/channels/src/components/new_search/new_search.tsx index c12b045ac79..dfaaa57fad8 100644 --- a/webapp/channels/src/components/new_search/new_search.tsx +++ b/webapp/channels/src/components/new_search/new_search.tsx @@ -168,6 +168,10 @@ const NewSearch = (): JSX.Element => { const openSearchBoxOnKeyPress = useCallback( (e: React.KeyboardEvent) => { + if (e.key === 'Shift' || e.key === 'Control' || e.key === 'Meta') { + return; + } + if (Keyboard.isKeyPressed(e, Constants.KeyCodes.TAB)) { return; } @@ -214,7 +218,7 @@ const NewSearch = (): JSX.Element => { onKeyDown={openSearchBoxOnKeyPress} onClick={openSearchBox} id='searchFormContainer' - role='search' + role='button' className='a11y__region' >