Skip to content

Commit

Permalink
Fixing accessiblity on search input (mattermost#29423)
Browse files Browse the repository at this point in the history
Automatic Merge
  • Loading branch information
jespino authored Dec 10, 2024
1 parent 0f5d160 commit 4c27e6e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webapp/channels/src/components/new_search/new_search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -214,7 +218,7 @@ const NewSearch = (): JSX.Element => {
onKeyDown={openSearchBoxOnKeyPress}
onClick={openSearchBox}
id='searchFormContainer'
role='search'
role='button'
className='a11y__region'
>
<i className='icon icon-magnify'/>
Expand Down

0 comments on commit 4c27e6e

Please sign in to comment.