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

@@ -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">

View File

@@ -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}

View File

@@ -163,8 +163,11 @@ export default styled.div`
margin: 0 ${theme.marginXXS}px;
}
.dt-pagination .pagination > li > a,
.dt-pagination .pagination > li > button,
.dt-pagination .pagination > li > span {
appearance: none;
border: 1px solid transparent;
font: inherit;
background-color: ${theme.colorBgBase};
color: ${theme.colorText};
border-color: ${theme.colorBorderSecondary};
@@ -172,10 +175,10 @@ export default styled.div`
border-radius: ${theme.borderRadius}px;
}
.dt-pagination .pagination > li.active > a,
.dt-pagination .pagination > li.active > button,
.dt-pagination .pagination > li.active > span,
.dt-pagination .pagination > li.active > a:focus,
.dt-pagination .pagination > li.active > a:hover,
.dt-pagination .pagination > li.active > button:focus,
.dt-pagination .pagination > li.active > button:hover,
.dt-pagination .pagination > li.active > span:focus,
.dt-pagination .pagination > li.active > span:hover {
background-color: ${theme.colorPrimary};