mirror of
https://github.com/apache/superset.git
synced 2026-09-01 13:01:33 +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:
co-authored by
Claude Sonnet 5
parent
710037d3d2
commit
e54eccd5fb
+5
-8
@@ -98,16 +98,13 @@ export default memo(
|
||||
key={item}
|
||||
className={currentPage === item ? 'active' : undefined}
|
||||
>
|
||||
<a
|
||||
href={`#page-${item}`}
|
||||
role="button"
|
||||
onClick={e => {
|
||||
e.preventDefault();
|
||||
onPageChange(item);
|
||||
}}
|
||||
<button
|
||||
type="button"
|
||||
aria-label={`${item + 1}`}
|
||||
onClick={() => onPageChange(item)}
|
||||
>
|
||||
{item + 1}
|
||||
</a>
|
||||
</button>
|
||||
</li>
|
||||
) : (
|
||||
<li key={item} className="dt-pagination-ellipsis">
|
||||
|
||||
@@ -363,12 +363,16 @@ function StickyWrap({
|
||||
}
|
||||
|
||||
return (
|
||||
// Virtualized/sticky table built from divs so the header/body can be
|
||||
// positioned independently; a real <table> would break that layout, so
|
||||
// role="table" is the correct ARIA pattern here, not the suggested tag.
|
||||
<div
|
||||
style={{
|
||||
width: maxWidth,
|
||||
height: sticky.realHeight || maxHeight,
|
||||
overflow: 'hidden',
|
||||
}}
|
||||
// eslint-disable-next-line jsx-a11y/prefer-tag-over-role
|
||||
role="table"
|
||||
>
|
||||
{headerTable}
|
||||
|
||||
Reference in New Issue
Block a user