From ef9375c47578045914c0fa4727388ba01e488354 Mon Sep 17 00:00:00 2001
From: Aman Pandey <74553951+salty-ivy@users.noreply.github.com>
Date: Fri, 19 Jan 2024 17:55:17 +0530
Subject: [PATCH] Fix: Remove blur action from orderable controller (#11476)
* remove blur action from orderable controller as it will update whenever any move is made
* change aria description for instructions
---
client/src/controllers/OrderableController.test.js | 6 +++---
.../wagtailadmin/pages/listing/_ordering_cell.html | 2 +-
wagtail/admin/views/pages/listing.py | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/client/src/controllers/OrderableController.test.js b/client/src/controllers/OrderableController.test.js
index d2606a2dff..ffb36f9f2d 100644
--- a/client/src/controllers/OrderableController.test.js
+++ b/client/src/controllers/OrderableController.test.js
@@ -32,15 +32,15 @@ describe('OrderableController', () => {
data-w-orderable-message-value="'__label__' has been updated!"
>
-
+
Item 73
-
+
Item 75
-
+
Item 93
diff --git a/wagtail/admin/templates/wagtailadmin/pages/listing/_ordering_cell.html b/wagtail/admin/templates/wagtailadmin/pages/listing/_ordering_cell.html
index d5723c386a..65fad562db 100644
--- a/wagtail/admin/templates/wagtailadmin/pages/listing/_ordering_cell.html
+++ b/wagtail/admin/templates/wagtailadmin/pages/listing/_ordering_cell.html
@@ -5,7 +5,7 @@
type="button"
aria-live="polite"
data-w-orderable-target="handle"
- data-action="keydown.up->w-orderable#up:prevent keydown.down->w-orderable#down:prevent keydown.enter->w-orderable#apply blur->w-orderable#apply"
+ data-action="keydown.up->w-orderable#up:prevent keydown.down->w-orderable#down:prevent keydown.enter->w-orderable#apply"
>
{% icon name="grip" classname="default" %}
diff --git a/wagtail/admin/views/pages/listing.py b/wagtail/admin/views/pages/listing.py
index d47dd7a594..5275005463 100644
--- a/wagtail/admin/views/pages/listing.py
+++ b/wagtail/admin/views/pages/listing.py
@@ -342,7 +342,7 @@ class BaseIndexView(generic.IndexView):
if self.show_ordering_column:
kwargs["attrs"] = {
"aria-description": _(
- "Press enter to select an item, use up and down arrows to move the item. Pressing enter or moving to a different item will complete the move."
+ "Focus on the drag button and press up or down arrows to move the item, then press enter to submit the change."
),
"data-controller": "w-orderable",
"data-w-orderable-active-class": "w-orderable--active",