mirror of
https://github.com/apache/superset.git
synced 2026-07-28 01:22:36 +00:00
chore(a11y): enable jsx-a11y/prefer-tag-over-role as error (#42078)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { handleKeyboardActivation } from '@superset-ui/core';
|
||||
import { useMemo, useState } from 'react';
|
||||
import { t } from '@apache-superset/core/translation';
|
||||
import { useTheme } from '@apache-superset/core/theme';
|
||||
@@ -167,10 +166,14 @@ export default function ColumnConfigControl<T extends ColumnConfig>({
|
||||
/>
|
||||
))}
|
||||
{needShowMoreButton && (
|
||||
<div
|
||||
role="button"
|
||||
tabIndex={-1}
|
||||
<button
|
||||
type="button"
|
||||
css={{
|
||||
appearance: 'none',
|
||||
border: 'none',
|
||||
background: 'none',
|
||||
font: 'inherit',
|
||||
width: '100%',
|
||||
padding: theme.sizeUnit * 2,
|
||||
textAlign: 'center',
|
||||
cursor: 'pointer',
|
||||
@@ -181,9 +184,6 @@ export default function ColumnConfigControl<T extends ColumnConfig>({
|
||||
},
|
||||
}}
|
||||
onClick={() => setShowAllColumns(!showAllColumns)}
|
||||
onKeyDown={handleKeyboardActivation(() =>
|
||||
setShowAllColumns(!showAllColumns),
|
||||
)}
|
||||
>
|
||||
{showAllColumns ? (
|
||||
<>
|
||||
@@ -194,7 +194,7 @@ export default function ColumnConfigControl<T extends ColumnConfig>({
|
||||
<Icons.DownOutlined /> {t('Show all columns')}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user