Skip to content

feat(drive-integration): keyboard accessibility for edit action buttons in review view [INTEG-3889]#11006

Merged
Franco Banfi (FBanfi) merged 7 commits into
drive-integration-v1.1from
integ-3889
May 29, 2026
Merged

feat(drive-integration): keyboard accessibility for edit action buttons in review view [INTEG-3889]#11006
Franco Banfi (FBanfi) merged 7 commits into
drive-integration-v1.1from
integ-3889

Conversation

@FBanfi
Copy link
Copy Markdown
Collaborator

@FBanfi Franco Banfi (FBanfi) commented May 26, 2026

Purpose

The review view relied entirely on mouse interaction for text selection and edit actions. This PR makes the core editing flow accessible via keyboard.

Approach

Review view (MappingView, EditMappingButton, useReviewTextSelection)

  • Document surface is now contentEditable (edit mode only) so Shift+Arrow selects text natively
  • Mutations are blocked via onBeforeInput/onPaste/onCut/onDrop — no actual edits possible
  • Tab with an active selection moves focus to the floating "Edit content mapping" button
  • A freezeSelection ref prevents selectionchange from clearing the selection during that Tab transition
  • EditMappingButton accepts onBlur — fires clearSelection when focus leaves the button

Overview (OverviewEntryList)

  • Entry checkboxes can be toggled with Enter

Multiselect dropdowns (ContentTypePickerModal, SelectTabsModal, FieldSelectionDropdown)

  • All three now use @contentful/f36-multiselect (standalone) for consistent keyboard and focus behaviour. Moreover, f36-multiselect is newer than Multiselect from f36-components.
  • Enter key selects options via a shared handleMultiselectKeyDown util in src/utils/keyboard.ts
  • Focus is restored to the checked option after selection via setTimeout to counteract the library's internal focus-reset

Testing steps

Keyboard flow (review view)

  1. Click into the document area
  2. Shift+Arrow to select text → floating "Edit content mapping" button appears
  3. Tab → focus moves to the button (selection preserved via freeze)
  4. Enter → edit modal opens
  5. Tab past the button (or blur) → button disappears, selection clears

Complete workflow run using only the keyboard:

Grabacion.de.pantalla.2026-05-28.a.la.s.12.54.57.p.m.mov

Breaking Changes

No.

Dependencies and/or References

Link to INTEG-3889

🤖 Co-authored with Claude Code

@FBanfi Franco Banfi (FBanfi) changed the base branch from master to drive-integration-v1.1 May 27, 2026 13:00
…G-3889]

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ns [INTEG-3889]

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@FBanfi Franco Banfi (FBanfi) marked this pull request as ready for review May 28, 2026 16:07
@FBanfi Franco Banfi (FBanfi) requested review from a team as code owners May 28, 2026 16:07
Copy link
Copy Markdown
Collaborator

@JuliRossi JuliRossi left a comment

Choose a reason for hiding this comment

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

⭐ Nice work!

Comment thread apps/drive-integration/src/utils/keyboard.ts Outdated
Comment thread apps/drive-integration/src/hooks/useReviewTextSelection.tsx Outdated
@FBanfi Franco Banfi (FBanfi) merged commit 7d5a66d into drive-integration-v1.1 May 29, 2026
11 checks passed
@FBanfi Franco Banfi (FBanfi) deleted the integ-3889 branch May 29, 2026 14:56
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