mirror of
https://github.com/apache/superset.git
synced 2026-04-18 07:35:09 +00:00
chore(Table): Add aria-label to Table page size selector (#29391)
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user