Skip to content

Commit 6c250f1

Browse files
committed
Add a proper label to the filter input
1 parent c01e12d commit 6c250f1

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/components/view/filters/filter-input.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ const areSuggestionsVisible = (autosuggestRef: React.RefObject<Autosuggest>) =>
116116

117117
export const FilterInput = <T extends unknown>(props: {
118118
value: string,
119+
label: string,
119120
placeholder: string,
120121
searchInputRef?: React.Ref<HTMLInputElement>,
121122
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void,
@@ -245,6 +246,7 @@ export const FilterInput = <T extends unknown>(props: {
245246
value: props.value,
246247
onChange: onInputChange,
247248
placeholder: props.placeholder,
249+
'aria-label': props.label,
248250
ref: props.searchInputRef
249251
}), [props.value, onInputChange, props.placeholder, props.searchInputRef]);
250252

src/components/view/filters/search-filter.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ export class SearchFilter<T> extends React.Component<{
576576
<FilterInput
577577
value={textInputValue}
578578
onChange={onInputChanged}
579+
label="Enter a string like 'hello' or a structured filter like hostname=google.com to filter the requests in the list"
579580
placeholder={otherFilters.length === 0
580581
? placeholder
581582
: '...'

0 commit comments

Comments
 (0)