Conversation
it fixes the types. Also: it removes the need to fix the value on the first load (isInitialized state)
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request updates the resizer component’s semantics by changing its ARIA role from "separator" to "spinbutton" and extends keyboard interaction support for better accessibility.
- Updated tests and component code to refer to "spinbutton" instead of "separator".
- Enhanced keyboard event handling by adding support for additional keys (ArrowUp, ArrowDown, PageUp, PageDown, Home) and updating associated constants.
- Updated CSS to reflect the new role and corresponding z-index variable names.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/components/HighTable/HighTable.test.tsx | Updated test assertions and error messages to match the new "spinbutton" role and extended key interaction tests. |
| src/components/HighTable/HighTable.module.css | Changed role selectors and updated z-index variable names for the new "spinbutton" role. |
| src/components/ColumnResizer/ColumnResizer.tsx | Modified role attribute, keyboard event handling (including new steps for key presses), and ARIA attributes to support "spinbutton" semantics. |
| src/components/ColumnHeader/ColumnHeader.test.tsx | Updated test queries to use getByRole("spinbutton") instead of getByRole("separator"). |
Comments suppressed due to low confidence (2)
src/components/ColumnResizer/ColumnResizer.tsx:140
- Consider documenting that aria-valuemin is hardcoded to 0 (representing the minimum width) so that future changes to minimum width requirements are easy to update.
role="spinbutton"
src/components/ColumnResizer/ColumnResizer.tsx:126
- [nitpick] Consider clarifying in the comment (or accompanying documentation) that the 'End' key is intentionally not handled so that users know this is by design.
// no 'End' key handling because the resizer has no max width
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.
The resizer should be a "spinbutton", not a "separator". I added support for some keys as described in https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/spinbutton_role.
It's a breaking change because the CSS selector is now
[role=spinbutton], instead of[role=separator]