Skip to content

Commit

Permalink
Merge pull request #1837 from yext/hotfixv1.16.2
Browse files Browse the repository at this point in the history
techops10133: fix multiple search bars on a page
  • Loading branch information
jesuyedavid authored Oct 4, 2023
2 parents 7099764 + 354f75c commit 002cb23
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/ui/components/search/autocompletecomponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ export default class AutoCompleteComponent extends Component {
resultIndex: this._resultIndex,
promptHeader: this._originalQuery.length === 0 ? this.promptHeader : null,
listLabelIdName: this.listLabelIdName,
autocompleteContainerIdName: `yxt-AutoComplete-container-${this._config.name.replaceAll('.', '-')}`,
eventOptions: this.eventOptions(data)
}));
}
Expand Down
1 change: 1 addition & 0 deletions src/ui/components/search/searchcomponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ export default class SearchComponent extends Component {
labelText: this.labelText,
inputLabelIdName: this.inputLabelIdName,
submitIcon: this.submitIcon,
searchBarContainerId: this._container.id,
submitText: this.submitText,
clearText: this.clearText,
showClearButton: this._showClearButton,
Expand Down
4 changes: 2 additions & 2 deletions src/ui/templates/search/search.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
aria-label="{{labelText}}"
aria-autocomplete="list"
aria-controls="{{autocompleteContainerIdName}}"
aria-describedby="instructions"
aria-describedby="{{searchBarContainerId}}-instructions"
aria-haspopup="listbox"
>
<div id="instructions" class="yxt-SearchBar-instructions sr-only">
<div id="{{searchBarContainerId}}-instructions" class="yxt-SearchBar-instructions sr-only">
{{translate
phrase='When autocomplete results are available, use up and down arrows to review and enter to select.'
}}
Expand Down

0 comments on commit 002cb23

Please sign in to comment.