Skip to content

Commit

Permalink
Add missing for-attribute and (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 86d9a50 commit 4936689
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/components/news/6249.fix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add missing for-attribute to checkbox * label to input (a11y). - @gomez
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ const CheckboxFacet = (props) => {
{choices.map(({ label, value }, i) => (
<div className="entry" key={value}>
<Checkbox
id={value}
disabled={isEditMode}
label={label}
htmlFor={value}
radio={!isMulti}
checked={
isMulti
Expand Down
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 4936689

Please sign in to comment.