Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export const DualListSelectorSearch: React.FunctionComponent = () => {
value={isAvailable ? availableFilter : chosenFilter}
onChange={(_event, value) => onFilterChange(value, isAvailable)}
onClear={() => onFilterChange('', isAvailable)}
aria-label={isAvailable ? 'Search available options' : 'Search chosen options'}
/>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export const DualListSelectorComplexOptionsActionsNext: React.FunctionComponent
onChange={(_event, value) => onFilterChange(value, isAvailable)}
onClear={() => onFilterChange('', isAvailable)}
isDisabled={isDisabled}
aria-label={isAvailable ? 'Search available options' : 'Search chosen options'}
/>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ export const DualListSelectorComposableTree: React.FunctionComponent<ExampleProp
value={isChosen ? chosenFilter : availableFilter}
onChange={(_event, value) => onChange(value)}
onClear={() => onChange('')}
aria-label={isChosen ? 'Search chosen items' : 'Search available items'}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const SearchInputAdvanced: React.FunctionComponent = () => {
/>
<br />
<SearchInput
aria-label="Advanced search input"
Comment thread
Mash707 marked this conversation as resolved.
Outdated
attributes={[
{ attr: 'username', display: 'Username' },
{ attr: 'firstname', display: 'First name' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const SearchInputBasic: React.FunctionComponent = () => {

return (
<SearchInput
aria-label="Basic"
Comment thread
Mash707 marked this conversation as resolved.
Outdated
placeholder="Find by name"
value={value}
onChange={(_event, value) => onChange(value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ export const SearchInputFocusSearch: React.FunctionComponent = () => {

return (
<>
<SearchInput ref={ref} value={value} onChange={(_event, value) => setValue(value)} onClear={() => setValue('')} />
<SearchInput
ref={ref}
value={value}
onChange={(_event, value) => setValue(value)}
onClear={() => setValue('')}
aria-label="Focus search input using ref"
Comment thread
Mash707 marked this conversation as resolved.
Outdated
/>
<Button onClick={() => ref.current && ref.current.focus()}>Focus on the search input</Button>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const SearchInputWithExpandable: React.FunctionComponent = () => {

return (
<SearchInput
aria-label="With expandable button"
Comment thread
Mash707 marked this conversation as resolved.
Outdated
placeholder="Find by name"
value={value}
onChange={(_event, value) => onChange(value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const SearchInputWithNavigableOptions: React.FunctionComponent = () => {

return (
<SearchInput
aria-label="Match with navigable options"
Comment thread
Mash707 marked this conversation as resolved.
Outdated
placeholder="Find by name"
value={value}
onChange={(_event, value) => onChange(value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const SearchInputWithResultCount: React.FunctionComponent = () => {

return (
<SearchInput
aria-label="Match with result count"
placeholder="Find by name"
value={value}
onChange={(_event, value) => onChange(value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const SearchInputWithSubmitButton: React.FunctionComponent = () => {

return (
<SearchInput
aria-label="With submit button"
Comment thread
Mash707 marked this conversation as resolved.
Outdated
placeholder="Find by name"
value={value}
onChange={(_event, value) => setValue(value)}
Expand Down
2 changes: 2 additions & 0 deletions packages/react-core/src/demos/SearchInput/SearchInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ SearchAutocomplete = () => {
ref={searchInputRef}
hint={hint}
id="autocomplete-search"
aria-label='Search with autocomplete'
/>
);

Expand Down Expand Up @@ -401,6 +402,7 @@ AdvancedComposableSearchInput = () => {
onSearch={onSubmit}
ref={searchInputRef}
id="custom-advanced-search"
aria-label='Composable advanced search'
/>
);

Expand Down
Loading