diff --git a/.changeset/grumpy-clocks-sell.md b/.changeset/grumpy-clocks-sell.md new file mode 100644 index 00000000000..0c3a965a89b --- /dev/null +++ b/.changeset/grumpy-clocks-sell.md @@ -0,0 +1,5 @@ +--- +'@primer/react': patch +--- + +Adds `aria-disabled` to inactive pagination buttons. diff --git a/src/DataTable/Pagination.tsx b/src/DataTable/Pagination.tsx index 2769a4e943e..9dc14038e50 100644 --- a/src/DataTable/Pagination.tsx +++ b/src/DataTable/Pagination.tsx @@ -226,6 +226,7 @@ export function Pagination({ className="TablePaginationAction" type="button" data-has-page={hasPreviousPage ? true : undefined} + aria-disabled={!hasPreviousPage ? true : undefined} onClick={() => { if (!hasPreviousPage) { return @@ -306,6 +307,7 @@ export function Pagination({ className="TablePaginationAction" type="button" data-has-page={hasNextPage ? true : undefined} + aria-disabled={!hasNextPage ? true : undefined} onClick={() => { if (!hasNextPage) { return