Skip to content

[breaking] Fix resizer semantics#202

Merged
severo merged 34 commits intomasterfrom
fix-resizer-semantics
Jun 4, 2025
Merged

[breaking] Fix resizer semantics#202
severo merged 34 commits intomasterfrom
fix-resizer-semantics

Conversation

@severo
Copy link
Copy Markdown
Contributor

@severo severo commented Jun 4, 2025

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]

severo added 30 commits May 27, 2025 15:42
it fixes the types. Also: it removes the need to fix the value on the
first load (isInitialized state)
@severo severo requested a review from Copilot June 4, 2025 20:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Base automatically changed from fix-details to master June 4, 2025 20:50
@severo severo changed the title Fix resizer semantics [breaking] Fix resizer semantics Jun 4, 2025
@severo severo merged commit afef182 into master Jun 4, 2025
10 checks passed
@severo severo deleted the fix-resizer-semantics branch June 4, 2025 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants