mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
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)
|
const [size, text] = Array.isArray(option)
|
||||||
? option
|
? option
|
||||||
: [option, option];
|
: [option, option];
|
||||||
|
const sizeLabel = size === 0 ? t('all') : size;
|
||||||
return (
|
return (
|
||||||
<option key={size} value={size}>
|
<option
|
||||||
|
aria-label={t('Show %s entries', sizeLabel)}
|
||||||
|
key={size}
|
||||||
|
value={size}
|
||||||
|
>
|
||||||
{text}
|
{text}
|
||||||
</option>
|
</option>
|
||||||
);
|
);
|
||||||
|
@ -181,10 +181,10 @@ function SearchInput({ count, value, onChange }: SearchInputProps) {
|
|||||||
<span className="dt-global-filter">
|
<span className="dt-global-filter">
|
||||||
{t('Search')}{' '}
|
{t('Search')}{' '}
|
||||||
<input
|
<input
|
||||||
|
aria-label={t('Search %s records', count)}
|
||||||
className="form-control input-sm"
|
className="form-control input-sm"
|
||||||
placeholder={tn('search.num_records', count)}
|
placeholder={tn('search.num_records', count)}
|
||||||
value={value}
|
value={value}
|
||||||
aria-label={t('Search %s records', count)}
|
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
@ -211,8 +211,13 @@ function SelectPageSize({
|
|||||||
const [size, text] = Array.isArray(option)
|
const [size, text] = Array.isArray(option)
|
||||||
? option
|
? option
|
||||||
: [option, option];
|
: [option, option];
|
||||||
|
const sizeLabel = size === 0 ? t('all') : size;
|
||||||
return (
|
return (
|
||||||
<option key={size} value={size}>
|
<option
|
||||||
|
aria-label={t('Show %s entries', sizeLabel)}
|
||||||
|
key={size}
|
||||||
|
value={size}
|
||||||
|
>
|
||||||
{text}
|
{text}
|
||||||
</option>
|
</option>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user