[ui5-table] movable rows cannot be reordered with the keyboard (WCAG 2.1.1)
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Start in TableDragAndDrop, which handles reordering only through the HTML5 drag handlers (_ondragstart, _ondragover, _ondrop, _ondragend), and in TableRow, where _onkeydown currently handles only Enter via the Keys.js helper isEnter. Reproduce with the ui5-table example from the issue: Tab to a movable row and try the arrow and Enter keys, and confirm that no move or move-over event fires. Done means a keyboard user can grab, move and drop or cancel a movable row, with the interaction design agreed in the thread first.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug Description
ui5-table supports drag-and-drop row reordering: rows marked movable emit move / move-over events (added in #9955). This works with a pointing device, but there is no keyboard-operable path to reorder a row. A keyboard-only user cannot grab a focused row and move it, so any reordering built on ui5-table movable rows fails WCAG 2.1.1 Keyboard (Level A).
Isolated example / steps to reproduce
Self-contained repro (loads UI5 2.26.0 from a CDN): a ui5-table with four movable rows and move / move-over handlers performing the reorder.
<ui5-table id="tbl">
<ui5-table-header-row slot="headerRow">
<ui5-table-header-cell>Name</ui5-table-header-cell>
</ui5-table-header-row>
<ui5-table-row movable row-key="1"><ui5-table-cell>Alpha</ui5-table-cell></ui5-table-row>
<ui5-table-row movable row-key="2"><ui5-table-cell>Bravo</ui5-table-cell></ui5-table-row>
<ui5-table-row movable row-key="3"><ui5-table-cell>Charlie</ui5-table-cell></ui5-table-row>
<ui5-table-row movable row-key="4"><ui5-table-cell>Delta</ui5-table-cell></ui5-table-row>
</ui5-table>
const tbl = document.getElementById('tbl');
// preventDefault() in move-over marks a valid drop target (otherwise `move` never fires)
tbl.addEventListener('move-over', (e) => {
if (e.detail.destination.placement !== 'On') e.preventDefault();
});
tbl.addEventListener('move', (e) => {
const { source, destination } = e.detail;
destination.element.insertAdjacentElement(
destination.placement === 'Before' ? 'beforebegin' : 'afterend',
source.element
);
});
Steps:
- Mouse (works): drag a row onto another → move fires and the order changes.
- Keyboard (does not work): Tab to focus a row, then try Enter, Space, ↑/↓, Ctrl+↑/↓, Ctrl+Shift+↑/↓. No move / move-over event fires and the order never changes. There is no affordance to grab a movable row from the keyboard.
Affected Component
No response
Expected Behaviour
A keyboard-only user should be able to grab a focused movable row and reposition it — e.g. an announced "grabbed" state, arrow keys to move, Enter/Space to drop, Escape to cancel — so reordering is fully keyboard-operable.
Note there is existing in-house precedent for this interaction: sap.f.dnd.GridKeyboardDragAndDrop in OpenUI5 provides Ctrl+arrow keyboard reordering (since 1.81). The same pattern isn't available for the web-components Table.
Root cause (from source, v2.26.0)
- TableDragAndDrop wires reordering only to HTML5 drag events (_ondragstart, _ondragover, _ondrop, _ondragend); no keydown handling.
- TableRow sets draggable from movable (toggleAttribute(this, "draggable", this.movable, "true")); its _onkeydown only handles Enter (the sole key helper imported from Keys.js is isEnter). There is no arrow-key grab/move interaction.
Isolated Example
https://stackblitz.com/edit/vitejs-vite-k4nhabtb
Steps to Reproduce
- Mouse (works): drag a row onto another → a
moveevent fires and the order changes. - Keyboard (does not work): press Tab until a row is focused, then try Enter, Space, ↑/↓, Ctrl+↑/↓, and Ctrl+Shift+↑/↓. No
move/move-overevent fires and the row order never changes. There is no affordance to grab a movable row from the keyboard.
Log Output, Stack Trace or Screenshots
No response
Priority
Medium
UI5 Web Components Version
2.26.0
Browser
Chrome
Operating System
macOS
Additional Context
No response
Organization
SAP LeanIX
Declaration
- I’m not disclosing any internal or sensitive information.
- Ngôn ngữ chính
- TypeScript
- Star
- 1.8k
- Fork
- 290
- Merge trung bình
- 2 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 54
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của UI5/webcomponents
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
UI5/webcomponents#14273 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Button]: crash on Safari 17 due to missing ElementInternals.states guard in _setBadgeOverlayStyleĐang mởbug TOPIC B
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 87/100
UI5/webcomponents#14270 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Feature Request][Side Navigation][A11Y]: Enhance user experience navigating components tree itemsCó thể đã có người làm @TeodorTaushanov đã nhận 5 ngày trước. Đang mởbug Medium Prio TOPIC RD
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
UI5/webcomponents#14232 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement feature request TOPIC RD
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
UI5/webcomponents#14222 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[SF][A11y][ui5-select] Conflicting ARIA: role="combobox" rendered with aria-roledescription="Listbox" (confuses screen-reader users)Có thể đã có người làm @PetyaMarkovaBogdanova đã nhận 9 ngày trước. Đang mởbug Medium Prio TOPIC P
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
UI5/webcomponents#14212 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của UI5/webcomponents
Issue tương tự
-
Waiting for: Product Owner
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
getsentry/sentry-javascript#26203 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
bytedance/flowgram.ai#1235 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
devswha/herdr-web-ui#3325 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100