Skip to content

Commit

Permalink
Use isDragging instead of isDragSource
Browse files Browse the repository at this point in the history
  • Loading branch information
clauderic committed Feb 11, 2025
1 parent 38f3793 commit 2c53eb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/accessibility-aria-grabbed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@dnd-kit/dom': patch
---

Use the `draggable.isDragging` property instead of `draggable.isDragSource` to set `aria-grabbing` and `aria-pressed` attributes.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class Accessibility extends Plugin<DragDropManager> {
}

for (const key of ['aria-pressed', 'aria-grabbed']) {
activator.setAttribute(key, String(draggable.isDragSource));
activator.setAttribute(key, String(draggable.isDragging));
}

activator.setAttribute('aria-disabled', String(draggable.disabled));
Expand Down

0 comments on commit 2c53eb9

Please sign in to comment.