Skip to content

Commit

Permalink
Add (hidden) label to input
Browse files Browse the repository at this point in the history
  • Loading branch information
Gomez committed Aug 12, 2024
1 parent 79bd3e7 commit 146e718
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/components/news/6249.fix
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Add missing for-attribute to checkbox (a11y). - @gomez
Add missing for-attribute to checkbox * label to input (a11y). - @gomez
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ const SearchInput = (props) => {
removeSearchQuery,
} = props;
const intl = useIntl();
const label = data.searchInputPrompt || intl.formatMessage(messages.search);

return (
<div className="search-input">
<Input
id={`${props.id}-searchtext`}
value={searchText}
placeholder={
data.searchInputPrompt || intl.formatMessage(messages.search)
}
aria-label={label}
placeholder={label}
fluid
onKeyPress={(event) => {
if (isLive || event.key === 'Enter') onTriggerSearch(searchText);
Expand Down

0 comments on commit 146e718

Please sign in to comment.