src/Swappable/Swappable.js
function onSwappableSwappedDefaultAnnouncement({dragEvent, swappedElement}) {
  const sourceText = dragEvent.source.textContent.trim() || dragEvent.source.id || 'swappable element';
  const overText = swappedElement.textContent.trim() || swappedElement.id || 'swappable element';

  return `Swapped ${sourceText} with ${overText}`;
}
function onSwappableSwappedDefaultAnnouncement({dragEvent, swappedElement}) {
  const sourceText = dragEvent.source.textContent.trim() || dragEvent.source.id || 'swappable element';
  const overText = swappedElement.textContent.trim() || swappedElement.id || 'swappable element';

  return `Swapped ${sourceText} with ${overText}`;
}
function onSwappableSwappedDefaultAnnouncement ( { dragEvent , swappedElement } ) { const sourceText = dragEvent . source . textContent . trim ( ) || dragEvent . source . id || 'swappable element' ; const overText = swappedElement . textContent . trim ( ) || swappedElement . id || 'swappable element' ; return ` ${ sourceText } ${ overText } ` ; }
Returns an announcement message when the Draggable element is swapped with another draggable element
@param {SwappableSwappedEvent} swappableEvent
@return {String}
Returns an announcement message when the Draggable element is swapped with another draggable element