Repository navigation
Conversation
…er E2E, trim test comments - Render Tree.DragButton beside the page link/quick-link button instead of inside it - Playwright: query the rendered 'Move' name and assert row order via data-key - Drop narration comments from tree.test.tsx
Rohit0301
approved these changes
Nov 18, 2026
harsh-vador
reviewed
Nov 18, 2026
…e E2E with real keys tw:invisible removed the drag button from the accessibility tree, so ArrowRight from a row skipped it. Hide it with opacity instead, like the other Tree consumers. The keyboard reorder test now reaches the handle with ArrowRight, walks drop targets with ArrowDown and asserts Home lands after Explore.
harsh-vador
reviewed
Nov 18, 2026
The quick-link <button> and page <Link> become one core Button (onPress for quick links, href for pages; React Aria's RouterProvider keeps navigation client-side). The delete button now sits beside the row link instead of inside it.
This reverts commit 6044daf.
harsh-vador
approved these changes
Nov 18, 2026
Rohit0301
enabled auto-merge (squash)
November 18, 2026 06:33
Rohit0301
deleted the
detail/bug-fix/fixes-38034-keyboard-accessible-drag-handle-for-tr-bc9cee
branch
November 18, 2026 06:34
This was referenced Nov 18, 2026
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.
Detail bug report: View on Detail
Describe your changes:
Fixes #38034
The shared
Treewrapper in@openmetadata/ui-core-componentswireduseDragAndDropinternally whenever a consumer suppliedonItemMove, but did not render, export, or document the<Button slot="drag">affordance React Aria's Tree requires for keyboard and screen-reader drag initiation. React Aria hardcodeshasDragButton: truefor every draggable row, so the Enter/Space drag-start handlers are delivered through thedragslot — without a button there, rows are nativelydraggable(mouse works) but keyboard-only and screen-reader users could not start a reorder at all (WCAG 2.1.1). The fouronItemMoveconsumers that rendered only an inert,aria-hiddengrip icon affected:pages/CustomizeAppModeSidebarPage/CustomizeAppModeSidebarPage.tsxcomponents/discovery/personal-space/Profile/tabs/personas/customize/NavigationEditor.tsxcomponents/discovery/personal-space/Profile/tabs/personas/customize/AiSidebarEditor.tsxcomponents/KnowledgeCenter/KnowledgePagesHierarchy/KnowledgePagesHierarchy.tsx(
pages/SettingsNavigationPage/SettingsNavigationPage.tsxwas already correct — it rendered<ButtonUtility slot="drag">directly — showing the omission was unintended.)I worked on this because the wrapper's documented contract ("consumers don't need to import it from
react-aria-components", "for full accessibility") was unfulfillable without React-Aria-specific knowledge the docstring never mentioned, and the gap blocked keyboard-only and screen-reader users from reordering on four screens.Type of change:
High-level design:
N/A — small change. The wrapper now exports
Tree.DragButton(mirroring the existingTree.ExpandButton), rendering<Button slot="drag">with a requiredaria-labeland a defaultDotsGridgrip icon (aria-hidden). TheonItemMoveandTreeJSDoc now explicitly require aTree.DragButton(or raw<Button slot="drag">) per draggable item, citing the WCAG 2.1.1 rationale and the React Aria dev warning. The four affected consumers swap the inert<DotsGrid aria-hidden>for<Tree.DragButton aria-label={t('label.move')}>, preserving eachdata-testid, the visible-on-hover styling, thecanEditAllgating inKnowledgePagesHierarchy, and usingtw:opacity-0 group-hover/focus-visible:opacity-100so the handle stays keyboard-focusable when hidden (anaria-hiddenicon was not focusable at all).Tests:
Use cases covered
onItemMovewith the correct{ sourceKey, targetKey, dropPosition }.onItemMove).pointer-events: none, so the row remains the pointer target).canEditAllis true; non-editors see no handle.Unit tests
openmetadata-ui-core-components/.../components/application/tree/tree.test.tsx(vitest, 6 tests) — covers the bug-state backstop (warns 3× whenTree.DragButtonis missing), the fix (no warning when present, real focusable button withslot="drag"andaria-label, Enter starts the keyboard drag session and the source row getsdata-dragging="true", second Enter drops and firesonItemMove), and the bug regression (Enter on the row does nothing when noTree.DragButtonis rendered).NavigationEditor.test.tsx,AiSidebarEditor.test.tsx,KnowledgePagesHierarchy.test.tsx) — each queriesgetByRole('button', { name: 'label.move' })and asserts the buttons haveslot="drag"and are notaria-hidden; the KnowledgePagesHierarchy backstop also verifies no handle renders whenEditAllis false.KnowledgePagesHierarchy,CustomizeAppModeSidebarPage.utils, andSettingsNavigationPage).Backend integration tests
Ingestion integration tests
Playwright (UI) tests
keyboard users can reorder navigation items via the drag handle button (a11y regression)toplaywright/e2e/Features/SettingsNavigationPage.spec.ts. It uses only the keyboard: it focuses the Home row, presses ArrowRight to reach theMovedrag button, presses Enter to start the drag, presses ArrowDown twice to reach "Insert between Explore and Lineage" (checking each drop target gets focus), then presses Enter to drop. It then checks that Save is enabled and that the rows now start with Explore, then Home (/explore, /my-data).SettingsNavigationPagehid its drag button withtw:invisible. That removes the button from the accessibility tree, so ArrowRight skipped straight to the switch. The page now uses the sameopacity-0+focus-visible:opacity-100pattern as the other consumers.--project=chromium --no-deps): all 9 tests inSettingsNavigationPage.spec.tspass, including the existing mouse drag-and-drop tests.Visual regression baselines
DotsGridicon with the same display-on-hover pattern as before — no rendering change beyond substituting a real button for an aria-hidden SVG).Manual testing performed
WithDragAndDropStorybook story with a Playwright probe: 4 rows render, 4button[slot="drag"]elements withMove Databases / Move Tables / Move Views / Move Pipelinesaria-labels, the inner grip SVG isaria-hidden="true", keyboard focus lands on the handle, and pressing Enter setsdata-dragging="true"on the source row. No React Aria "must contain a<Button slot="drag">" dev warning fired.@axe-core/playwrightagainst the rendered story; 0 violations forwcag2a/wcag21a/wcag2aa/wcag21aa(21 passing checks includingaria-hidden-focus,aria-required-attr,aria-required-children; the loneincompleteis the iframe-scopedbypasscheck).UI screen recording:
Screen.Recording.2026-11-18.at.11.30.29.AM.mov
Not applicable — standalone accessibility bug fix. Full-stack UI recording was blocked locally: the published
docker.getcollate.io/openmetadata/server:2.0.0-SNAPSHOTmanifest 404s (so the Docker dev stack with the fixed UI bundle could not be brought up at the matching version), and the only installable image (1.8.10) does not expose the/api/v1/auth/loginendpoint Playwright's auth setup expects. The Storybook live probe and the axe-core scan above cover the rendered behaviour and the accessibility contract.Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.docs/decisions/(see itsREADME.md). This decision adds a required-but-not-auto-rendered sub-component (Tree.DragButton) and documents the contract in the wrapper's JSDoc and stories; no separate ADR is needed because the contract is React Aria's, not new to this repo.Automatic Fixes PRs can be configured here.


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issues were found.Summary
Adds
Tree.DragButtonand replaces inert drag icons in four consumers so keyboard users can start reordering.Reviews (10) · Last reviewed commit: "Revert "Use core Button for knowledge pa..." · Reviewed by Greptile