[Uptime] Add-aria-labels-for-filter-inputs (#82249)

This commit is contained in:
Shahzad 2020-11-03 16:43:07 +01:00 committed by GitHub
parent a0fded52eb
commit 6f6c2cf042
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -24,6 +24,7 @@ exports[`FilterPopover component does not show item list when loading 1`] = `
>
<EuiPopoverTitle>
<EuiFieldSearch
aria-label="Search for bar"
compressed={false}
disabled={true}
fullWidth={false}
@ -61,6 +62,7 @@ exports[`FilterPopover component renders without errors for valid props 1`] = `
>
<EuiPopoverTitle>
<EuiFieldSearch
aria-label="Search for bar"
compressed={false}
disabled={true}
fullWidth={false}

View file

@ -100,6 +100,12 @@ export const FilterPopover = ({
incremental={true}
disabled={items.length === 0}
onSearch={(query) => setSearchQuery(query)}
aria-label={i18n.translate('xpack.uptime.filterPopout.searchMessage.ariaLabel', {
defaultMessage: 'Search for {title}',
values: {
title: title.toLowerCase(),
},
})}
placeholder={
loading
? i18n.translate('xpack.uptime.filterPopout.loadingMessage', {
@ -108,7 +114,7 @@ export const FilterPopover = ({
: i18n.translate('xpack.uptime.filterPopout.searchMessage', {
defaultMessage: 'Search {title}',
values: {
title,
title: title.toLowerCase(),
},
})
}