Skip to content

Commit e2bf210

Browse files
committed
v7.9.4
1 parent 763d953 commit e2bf210

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
## 7.9.4 - 2025-07-07
11+
12+
### Fixed
13+
14+
- Improved the accessibility of the pagination by defining when the previous and next button are disabled
15+
1016
## 7.9.3 - 2025-07-04
1117

1218
### Fixed

packages/antwerp-ui/react-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@a-ui/react",
3-
"version": "7.9.3",
3+
"version": "7.9.4",
44
"license": "MIT",
55
"main": "./index.js",
66
"types": "./index.d.ts",

packages/antwerp-ui/react-components/src/lib/molecules/pagination/Pagination.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,28 @@ export function Pagination({
9797
<nav role="navigation" aria-label={ariaLabel} data-qa={qa}>
9898
<ul className={paginationClass}>
9999
<li className="m-pagination__prev" key={'pagination__prev'}>
100-
<a href={'#'} className={paginationPreviousClass} aria-label={ariaLabelPreviousPage} onClick={onPrev}>
100+
<a
101+
href={'#'}
102+
className={paginationPreviousClass}
103+
aria-label={ariaLabelPreviousPage}
104+
aria-disabled={currentPage <= 1 ? 'true' : undefined}
105+
tabIndex={currentPage <= 1 ? -1 : 0}
106+
onClick={onPrev}
107+
>
101108
<Icon name="arrow-left-1" />
102109
</a>
103110
</li>
104111
{display === 'text' && renderTextPagination(currentPage, totalPages, text, ariaLabelPage)}
105112
{display === 'numbers' && renderNumbersPagination(currentPage, totalPages, ariaLabelPage, pageChange)}
106113
<li className="m-pagination__next" key="pagination__next">
107-
<a href={'#'} className={paginationNextClass} aria-label={ariaLabelNextPage} onClick={onNext}>
114+
<a
115+
href={'#'}
116+
className={paginationNextClass}
117+
aria-label={ariaLabelNextPage}
118+
aria-disabled={currentPage >= totalPages ? 'true' : undefined}
119+
tabIndex={currentPage >= totalPages ? -1 : 0}
120+
onClick={onNext}
121+
>
108122
<Icon name="arrow-right-1" />
109123
</a>
110124
</li>

0 commit comments

Comments
 (0)