refactor(reorder): drop the Alt + Arrow shortcut, keep drag only

The reorder shortcut cannot be made reliable in this UI. `Alt + Arrow` is
the browser's tab-history / back-forward gesture on several platforms,
and the modal already binds bare `ArrowLeft`/`ArrowRight` to model
navigation, so the binding either did nothing — a keypress with nothing
focused never reaches a listener on the tag list — or fought the browser.
An affordance that occasionally navigates the page away is worse than
having no keyboard path at all, so drop it.

Reordering is pointer-only again: drag the chip (tags) or its `⠿` grip
(trigger words, whose chip body is click-to-edit). Everything that existed
only to serve the shortcut goes with it — the keydown listener, the hover
tracking used to resolve the target chip, the aria-live announcements, the
per-grip position labels and `moveItemWithinContainer`. The grip becomes a
decorative, non-focusable `<span>` (`aria-hidden`, behind a 5px drag
threshold) instead of a `<button>`, so it no longer promises a keyboard
action it cannot perform.

The tooltip and hint drop the shortcut mention in all 10 locales
(`common.reorder.dragHandle` = "Drag to reorder" and the localised
equivalents); `common.reorder.ariaLabel` and `common.reorder.announcement`
are pruned from every locale by the sync script. The i18n guidelines
record the decision so no shortcut is re-added without re-adding the keys.
This commit is contained in:
Will Miao
2026-09-17 09:07:24 +08:00
parent f67689b0f9
commit e09fe5888b
19 changed files with 116 additions and 405 deletions
+1 -3
View File
@@ -3,9 +3,7 @@
"cancel": "Abbrechen",
"confirm": "Bestätigen",
"reorder": {
"dragHandle": "Zum Neuordnen ziehen (Alt + ↑/↓)",
"ariaLabel": "{item} neu anordnen, Position {position} von {total}",
"announcement": "An Position {position} von {total} verschoben"
"dragHandle": "Zum Neuordnen ziehen"
},
"actions": {
"save": "Speichern",
+1 -3
View File
@@ -3,9 +3,7 @@
"cancel": "Cancel",
"confirm": "Confirm",
"reorder": {
"dragHandle": "Drag to reorder (Alt + ↑/↓)",
"ariaLabel": "Reorder {item}, position {position} of {total}",
"announcement": "Moved to position {position} of {total}"
"dragHandle": "Drag to reorder"
},
"actions": {
"save": "Save",
+1 -3
View File
@@ -3,9 +3,7 @@
"cancel": "Cancelar",
"confirm": "Confirmar",
"reorder": {
"dragHandle": "Arrastra para reordenar (Alt + ↑/↓)",
"ariaLabel": "Reordenar {item}, posición {position} de {total}",
"announcement": "Movido a la posición {position} de {total}"
"dragHandle": "Arrastra para reordenar"
},
"actions": {
"save": "Guardar",
+1 -3
View File
@@ -3,9 +3,7 @@
"cancel": "Annuler",
"confirm": "Confirmer",
"reorder": {
"dragHandle": "Glisser pour réordonner (Alt + ↑/↓)",
"ariaLabel": "Réordonner {item}, position {position} sur {total}",
"announcement": "Déplacé en position {position} sur {total}"
"dragHandle": "Glisser pour réordonner"
},
"actions": {
"save": "Enregistrer",
+1 -3
View File
@@ -3,9 +3,7 @@
"cancel": "ביטול",
"confirm": "אישור",
"reorder": {
"dragHandle": "גרור כדי לשנות סדר (Alt + ↑/↓)",
"ariaLabel": "סדר מחדש את {item}, מיקום {position} מתוך {total}",
"announcement": "הועבר למיקום {position} מתוך {total}"
"dragHandle": "גרור כדי לשנות סדר"
},
"actions": {
"save": "שמירה",
+1 -3
View File
@@ -3,9 +3,7 @@
"cancel": "キャンセル",
"confirm": "確認",
"reorder": {
"dragHandle": "ドラッグして並べ替えAlt + ↑/↓)",
"ariaLabel": "{item} を並べ替え、{total} 件中 {position} 番目",
"announcement": "{total} 件中 {position} 番目に移動しました"
"dragHandle": "ドラッグして並べ替え"
},
"actions": {
"save": "保存",
+1 -3
View File
@@ -3,9 +3,7 @@
"cancel": "취소",
"confirm": "확인",
"reorder": {
"dragHandle": "드래그하여 순서 변경 (Alt + ↑/↓)",
"ariaLabel": "{item} 순서 변경, 총 {total}개 중 {position}번째",
"announcement": "총 {total}개 중 {position}번째로 이동했습니다"
"dragHandle": "드래그하여 순서 변경"
},
"actions": {
"save": "저장",
+1 -3
View File
@@ -3,9 +3,7 @@
"cancel": "Отмена",
"confirm": "Подтвердить",
"reorder": {
"dragHandle": "Перетащите, чтобы изменить порядок (Alt + ↑/↓)",
"ariaLabel": "Изменить порядок {item}, позиция {position} из {total}",
"announcement": "Перемещено на позицию {position} из {total}"
"dragHandle": "Перетащите, чтобы изменить порядок"
},
"actions": {
"save": "Сохранить",
+1 -3
View File
@@ -3,9 +3,7 @@
"cancel": "取消",
"confirm": "确认",
"reorder": {
"dragHandle": "拖拽以调整顺序Alt + ↑/↓)",
"ariaLabel": "调整 {item} 的顺序,第 {position} 个,共 {total} 个",
"announcement": "已移动到第 {position} 个,共 {total} 个"
"dragHandle": "拖拽以调整顺序"
},
"actions": {
"save": "保存",
+1 -3
View File
@@ -3,9 +3,7 @@
"cancel": "取消",
"confirm": "確認",
"reorder": {
"dragHandle": "拖曳以調整順序Alt + ↑/↓)",
"ariaLabel": "調整 {item} 的順序,第 {position} 個,共 {total} 個",
"announcement": "已移動到第 {position} 個,共 {total} 個"
"dragHandle": "拖曳以調整順序"
},
"actions": {
"save": "儲存",