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:
Evan Rusackas
2026-07-26 17:38:55 -07:00
committed by GitHub
parent 710037d3d2
commit e54eccd5fb
135 changed files with 1301 additions and 1155 deletions

View File

@@ -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 /> &nbsp; {t('Show all columns')}
</>
)}
</div>
</button>
)}
</div>
</>