Skip to content

Commit

Permalink
Fix screen reader announcement for drag end event
Browse files Browse the repository at this point in the history
  • Loading branch information
jperals committed Mar 21, 2023
1 parent e1e9cb0 commit 5815d63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/collection-preferences/content-display.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default function ContentDisplayPreference({
onDragEnd({ active, over }) {
if (over && liveAnnouncementDndItemCommitted) {
const initialIndex = sortedOptions.findIndex(option => option.id === active.id);
const finalIndex = options.findIndex(option => option.id === over.id);
const finalIndex = sortedOptions.findIndex(option => option.id === over.id);
return liveAnnouncementDndItemCommitted(initialIndex + 1, finalIndex + 1, options.length);
}
},
Expand Down

0 comments on commit 5815d63

Please sign in to comment.