Fix: accessible snippets pagination#372
Merged
rami-elementor merged 1 commit intocore-betafrom May 5, 2026
Merged
Conversation
sheabunge
approved these changes
May 5, 2026
| confirmInputValue={() => setCurrentPage(inputValue)} | ||
| />{'\n'} | ||
| }) => { | ||
| const navLabel = 'top' === which |
Member
There was a problem hiding this comment.
This variable would be cleaner inlined, IMO.
|
|
||
| type NavigationLinksProps = Omit<PaginationControlsProps, 'totalItems'> | ||
|
|
||
| const NavigationLinks: React.FC<NavigationLinksProps> = ({ |
Member
There was a problem hiding this comment.
What's the benefit in taking this block out specifically? I don't think the original component was overly complex, and this leads to more mass prop-drilling.
Contributor
Author
There was a problem hiding this comment.
Lint warning:
Arrow function has too many lines (52). Maximum allowed is 50 max-lines-per-function
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 pull request refactors the pagination controls in
TablePagination.tsxto improve code organization and accessibility. The main changes include extracting navigation link logic into a separateNavigationLinkscomponent and wrapping the pagination controls in a<nav>element with an accessible label.Component refactoring and accessibility improvements:
NavigationLinkscomponent, separating concerns and making the codebase more modular.<nav>element with anaria-labelto improve accessibility for screen readers. The label changes depending on whether the controls are above or below the table.PaginationControlscomponent to use the newNavigationLinkscomponent and reorganized its structure for clarity.