Improve CursorPagination template accessibility#9905
Open
kosbemrunal wants to merge 3 commits intoencode:mainfrom
Open
Improve CursorPagination template accessibility#9905kosbemrunal wants to merge 3 commits intoencode:mainfrom
kosbemrunal wants to merge 3 commits intoencode:mainfrom
Conversation
…l navigation hints
Contributor
There was a problem hiding this comment.
Pull request overview
Improves the DRF pagination “previous/next” template’s accessibility metadata by adding ARIA attributes and semantic link relations to help assistive technologies interpret pagination controls.
Changes:
- Add
rel="prev"/rel="next"to pagination links. - Add
aria-labelto the previous/next links. - Add
aria-disabled="true"andtabindex="-1"for disabled pagination states.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rest_framework/templates/rest_framework/pagination/previous_and_next.html
Show resolved
Hide resolved
rest_framework/templates/rest_framework/pagination/previous_and_next.html
Show resolved
Hide resolved
rest_framework/templates/rest_framework/pagination/previous_and_next.html
Show resolved
Hide resolved
rest_framework/templates/rest_framework/pagination/previous_and_next.html
Show resolved
Hide resolved
browniebroke
approved these changes
Mar 28, 2026
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.
This PR improves the accessibility of the pagination template by:
aria-labelattributes for better screen reader supportrel="prev"andrel="next"for semantic navigationaria-disabledandtabindex="-1"for disabled statesThese changes improve accessibility without modifying existing functionality or behavior.