Skip to content

sorta11y

sorta11y is the accessible, dependency-free alternative to drag-and-drop sort libraries. It lets people reorder a vertical list with the keyboard (a screen-reader-safe grab / move / drop model) as well as with the mouse, touch or pen, and announces every change through an ARIA live region.

It progressively enhances a server-rendered <ul><li> list, so it degrades gracefully and coexists with whatever else is already on the page. No framework, no jQuery, no build step.

  • Grab · move · drop on the keyboard: Space to pick up, arrows to move, Space to drop, Esc to cancel.
  • The same model for a single pointer — drag it, or tap to pick up and tap again to place. That tap path is the WCAG 2.5.7 alternative to dragging.
  • One polite live region per instance, pre-inserted so the first announcement is never swallowed.
  • Announcements in your own wording — labels are functions, so they interpolate positions and pluralise properly.
  • Focus stays put — items are moved, not re-created — so the focused item keeps focus and it never falls back to <body> after a reorder.
  • prefers-reduced-motion honoured: instant reposition instead of a slide.
  • Zero runtime dependencies and no build step required to use it.
If you want to…Go to
Get it into your projectInstallation
See the smallest working exampleQuick start
Understand the interaction modelKeyboard
Know what happens under a screen readerAccessibility model
Look up an option or methodOptions
Try it before reading anythingLive playground

Popular sort libraries are powerful but not keyboard- or screen-reader-accessible out of the box — SortableJS’s accessibility gap has been an open, frequently requested issue since 2017. sorta11y deliberately trades “do everything” scope for one thing done well: a single vertical list anyone can reorder, including keyboard and screen-reader users.

That focus is the point. If you need nested trees, multi-list transfer or grid reordering, sorta11y is the wrong tool — and says so rather than shipping an inaccessible version of it.