fix(ui): add accessible label to pagination arrows#17380
Open
vansh17June wants to merge 3 commits into
Open
Conversation
vansh17June
requested review from
AlessioGr,
JarrodMFlesch and
jacobsfletch
as code owners
July 17, 2026 11:02
JarrodMFlesch
requested changes
Jul 17, 2026
| disabled={isDisabled} | ||
| onClick={!isDisabled ? updatePage : undefined} | ||
| type="button" | ||
|
|
|
|
||
| > | ||
| <ChevronIcon /> | ||
| <ChevronIcon /> |
Contributor
There was a problem hiding this comment.
Extra space here, remove.
| const { direction = 'right', isDisabled = false, updatePage } = props | ||
|
|
||
| const ariaLabel = | ||
| direction === 'left' ? 'Previous page' : 'Next page' |
Contributor
There was a problem hiding this comment.
You will need to use change this a bit to use translations.
// ... imports
+ import { useTranslation } from '../../../providers/Translation/index.js'
// ... function code
+ const { t } = useTranslation()
- const ariaLabel = direction === 'left' ? 'Previous page' : 'Next page'
+ const ariaLabel = direction === 'left' ? t('general:previous') : t('general:next')
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Adds accessible names to the admin pagination arrow buttons and marks the decorative chevron icon as hidden from assistive technologies.
Why?
The pagination controls are icon-only buttons and currently have no accessible name, causing screen readers to announce them only as "button". This triggers the axe-core
button-nameaccessibility rule and makes the controls difficult to understand for screen-reader users.How?
Added an
aria-labeltoClickableArrow.Derived the label from the
directionprop:left→Previous pageright→Next pageFixes #17377