fix: keyboard accessibility in Content-Type Builder field actions#24566
Merged
HichamELBSI merged 1 commit intostrapi:developfrom Oct 14, 2025
dev-shahed:fix/content-type-builder-keyboard-accessibility
Merged
fix: keyboard accessibility in Content-Type Builder field actions#24566HichamELBSI merged 1 commit intostrapi:developfrom dev-shahed:fix/content-type-builder-keyboard-accessibility
HichamELBSI merged 1 commit intostrapi:developfrom
dev-shahed:fix/content-type-builder-keyboard-accessibility
Conversation
|
@dev-shahed is attempting to deploy a commit to the Strapi Team on Vercel. A member of the Team first needs to authorize it. |
2 tasks
Contributor
Author
|
Hi maintainers 👋 |
HichamELBSI
requested changes
Oct 13, 2025
HichamELBSI
previously approved these changes
Oct 13, 2025
Contributor
HichamELBSI
left a comment
There was a problem hiding this comment.
Thanks for your contribution @dev-shahed!
Contributor
|
@dev-shahed There are some issues with the commit message, please make it short (< 100 characters). And make sure to squash your commits as well please. |
HichamELBSI
approved these changes
Oct 14, 2025
Contributor
Author
@HichamELBSI Thanks for merging! Appreciate your time reviewing it... |
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.
Fix Keyboard Accessibility in Content-Type Builder
Issue Validated ✅
The reported accessibility issue exists in the Content-Type Builder. Keyboard and screen reader users cannot activate the Edit and Delete buttons for fields in the field list.
Root Cause
handleDeleteevent handler was typed asReact.MouseEvent, which doesn't accept keyboard events.IconButtoncomponents didn't have explicitonKeyDownhandlers to handle Enter and Space key presses.PointerSensor, making it inaccessible to keyboard users.Changes Made
1. AttributeRow.tsx (
packages/core/content-type-builder/admin/src/components/AttributeRow.tsx)Updated Event Handler Types
handleDeleteto accept bothReact.MouseEvent | React.KeyboardEventhandleClickto accept bothReact.MouseEvent | React.KeyboardEvent(optional parameter)Added Keyboard Event Handlers
handleEditKeyDown: Listens for Enter or Space key and triggershandleClickhandleDeleteKeyDown: Listens for Enter or Space key and triggershandleDeleteUpdated IconButtons
onKeyDown={handleEditKeyDown}to Edit IconButtononKeyDown={handleDeleteKeyDown}to Delete IconButton2. List.tsx (
packages/core/content-type-builder/admin/src/components/List.tsx)Added Keyboard Support for Drag and Drop
KeyboardSensorandsortableKeyboardCoordinatesfrom@dnd-kitsensorsconfiguration to include bothPointerSensorandKeyboardSensorsortableKeyboardCoordinatesfor proper sortable keyboard navigationTesting Performed
✅
yarn lint- All checks passed✅
yarn setup- Build completed successfully✅ Code follows existing patterns from
useKeyboardDragAndDrophookExpected User Impact
After this fix:
How to test
Testing with Screen Reader
Screenshots/Videos
Related issue(s)/PR(s) #24565
Let us know if this is related to any issue/pull request