mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(a11y): remove textbox role from search bar wrapper (#55406)
This commit is contained in:
+1
-1
@@ -159,7 +159,7 @@
|
||||
"@types/react-gtm-module": "2.0.3",
|
||||
"@types/react-helmet": "6.1.11",
|
||||
"@types/react-instantsearch-core": "6.26.10",
|
||||
"@types/react-instantsearch-dom": "6.12.7",
|
||||
"@types/react-instantsearch-dom": "6.12.8",
|
||||
"@types/react-redux": "7.1.33",
|
||||
"@types/react-responsive": "8.0.8",
|
||||
"@types/react-scrollable-anchor": "0.6.4",
|
||||
|
||||
@@ -212,22 +212,21 @@ export class SearchBar extends Component<SearchBarProps, SearchBarState> {
|
||||
<HotKeys handlers={this.keyHandlers} keyMap={this.keyMap}>
|
||||
<div className='fcc_search_wrapper'>
|
||||
<ObserveKeys except={['Space']}>
|
||||
<div onFocus={this.handleFocus} role='textbox'>
|
||||
<SearchBox
|
||||
data-playwright-test-label='header-search'
|
||||
focusShortcuts={['83', '191']}
|
||||
onChange={this.handleChange}
|
||||
onSubmit={e => {
|
||||
this.handleSearch(e);
|
||||
}}
|
||||
showLoadingIndicator={false}
|
||||
translations={{
|
||||
submitTitle: t('icons.magnifier'),
|
||||
resetTitle: t('icons.input-reset'),
|
||||
placeholder: t('search.placeholder')
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<SearchBox
|
||||
data-playwright-test-label='header-search'
|
||||
focusShortcuts={['83', '191']}
|
||||
onChange={this.handleChange}
|
||||
onSubmit={e => {
|
||||
this.handleSearch(e);
|
||||
}}
|
||||
showLoadingIndicator={false}
|
||||
translations={{
|
||||
submitTitle: t('icons.magnifier'),
|
||||
resetTitle: t('icons.input-reset'),
|
||||
placeholder: t('search.placeholder')
|
||||
}}
|
||||
onFocus={this.handleFocus}
|
||||
/>
|
||||
</ObserveKeys>
|
||||
{isDropdownEnabled && isSearchFocused && (
|
||||
<SearchHits
|
||||
|
||||
Reference in New Issue
Block a user