Drag-to-reorder has no keyboard alternative in Grid, Replicator, Bard or structure trees
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
調査の方向性
Start by reading resources/js/components/sortable/SortableList.vue and Sortable.js, then inspect ui/DragHandle.vue and the affected row, set, and tree components named in the issue. The issue proposes menu-based Move Up/Move Down actions as a first step, with keyboard drag handling and announcements as a further step. Done means reordering is possible without a pointer across the affected controls and keyboard users receive the expected feedback.
索引モデルが issue の本文から書いたものです。
説明
Bug description
Reordering in the CP is implemented entirely through @shopify/draggable pointer events. There is no keyboard handling anywhere in the sortable layer and no menu-based alternative, so reordering is mouse-only across the whole Control Panel.
Affected: Grid rows, Replicator sets, Bard sets, the page tree, the navigation tree, blueprint fields and tabs, Table rows, List items.
Verified:
grep -c 'keydown\|ArrowUp\|ArrowDown'in https://github.com/statamic/cms/blob/v6.31.0/resources/js/components/sortable/SortableList.vue -> 0- Same in https://github.com/statamic/cms/blob/v6.31.0/resources/js/components/sortable/Sortable.js -> 0
- The Grid row menu offers only Duplicate Row and Delete Row, no move actions: https://github.com/statamic/cms/blob/v6.31.0/resources/js/components/fieldtypes/grid/Row.vue#L18-L19
- The Bard set handle is not even focusable. It is a
<span>with amousedownlistener: https://github.com/statamic/cms/blob/v6.31.0/resources/js/components/fieldtypes/bard/Set.vue#L29
ui/DragHandle.vue is a real <button> with aria-label="Drag to reorder", so it announces itself as actionable, but pressing Space, Enter or arrow keys on it does nothing and emits nothing to any live region.
WCAG 2.1 SC 2.1.1 Keyboard (Level A). Under WCAG 2.2 this would also fail SC 2.5.7 Dragging Movements.
How to reproduce
composer create-project statamic/statamic- Add a Grid field with two or more rows to a blueprint, or a Replicator with two sets
- Open the entry and Tab to a row's drag handle
- Press Space, then ArrowDown, then Enter
Expected: the row moves. Actual: row order is unchanged and nothing is announced.
Suggested fix
Two steps, and the first is worth shipping on its own:
- Add Move Up / Move Down items to every row and set dropdown menu. Grid rows, Replicator sets, Bard sets, tree branches. This alone satisfies 2.1.1 and needs no new drag machinery.
- Wire a keyboard sensor onto
ui/DragHandle.vue(Space to lift, arrows to move, Enter to drop, Escape to cancel) with anaria-liveannouncement of the new position.
Also worth making the Bard set handle a <button> so it is at least reachable.
Environment
Environment
Laravel Version: 13.30.1
PHP Version: 8.4.23
Composer Version: 2.10.2
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file
Storage
public/storage: NOT LINKED
Statamic
Addons: 0
License Key: Not set
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.31.0 PRO
Installation
Fresh statamic/statamic site via CLI
Additional details
Found during a WCAG 2.1 AA audit of a vanilla composer create-project statamic/statamic install with no addons and no custom code. Tested with axe-core 4.x on Chromium 153 at 1440x1000, plus manual keyboard traversal. Source references point at v6.31.0.
- 主要言語
- PHP
- スター
- 4.9k
- フォーク
- 647
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 124
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
statamic/cms のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
accessibility
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
[7.x] Reintroduce parser error for mixed pipe/shorthand modifier syntax対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンantlers
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
Nested Replicator inside Bard set remounts and resets collapsed state on field interaction対応中かも @edalzell が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
caching nocache
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
statamic/cms#15643 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
sync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
[Sync EN] Document Error thrown by shm_* functions on a detached segment (#5975)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンsync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 3 日以内に返信
-
Перевод устарел
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
新版升级一下对应的依赖可以么オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100