mirror of https://github.com/apache/superset.git
chore(Table): Add aria-label to Table page size selector (#29391)
This commit is contained in:
parent
2a587a771c
commit
66bc8ceddd
|
@ -48,8 +48,13 @@ function DefaultSelectRenderer({
|
|||
const [size, text] = Array.isArray(option)
|
||||
? option
|
||||
: [option, option];
|
||||
const sizeLabel = size === 0 ? t('all') : size;
|
||||
return (
|
||||
<option key={size} value={size}>
|
||||
<option
|
||||
aria-label={t('Show %s entries', sizeLabel)}
|
||||
key={size}
|
||||
value={size}
|
||||
>
|
||||
{text}
|
||||
</option>
|
||||
);
|
||||
|
|
|
@ -181,10 +181,10 @@ function SearchInput({ count, value, onChange }: SearchInputProps) {
|
|||
<span className="dt-global-filter">
|
||||
{t('Search')}{' '}
|
||||
<input
|
||||
aria-label={t('Search %s records', count)}
|
||||
className="form-control input-sm"
|
||||
placeholder={tn('search.num_records', count)}
|
||||
value={value}
|
||||
aria-label={t('Search %s records', count)}
|
||||
onChange={onChange}
|
||||
/>
|
||||
</span>
|
||||
|
@ -211,8 +211,13 @@ function SelectPageSize({
|
|||
const [size, text] = Array.isArray(option)
|
||||
? option
|
||||
: [option, option];
|
||||
const sizeLabel = size === 0 ? t('all') : size;
|
||||
return (
|
||||
<option key={size} value={size}>
|
||||
<option
|
||||
aria-label={t('Show %s entries', sizeLabel)}
|
||||
key={size}
|
||||
value={size}
|
||||
>
|
||||
{text}
|
||||
</option>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue