Chuyển đến nội dung
Skillpedia
Website và giao diện (frontend)75k · #2822

draggable-accessibility

Skill này làm gì

Skill này kiểm tra các tính năng kéo và thả trên website để người không dùng được chuột vẫn sử dụng được. Skill dành cho lập trình viên xây các mục có thể di chuyển hoặc sắp xếp.

Khi nào nên dùng

  • ✓Khi website có các mục người dùng có thể kéo để sắp xếp hoặc di chuyển.
  • ✓Khi người dùng bàn phím không thể di chuyển các mục trên trang.
  • ✓Khi bạn muốn trình đọc màn hình thông báo các thao tác kéo.

Liên kết skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/draggable-accessibility/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/draggable-accessibility/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể làm cho danh sách kéo và thả trên trang của tôi hoạt động bằng bàn phím không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent kiểm tra các cách thay thế bằng bàn phím như phím mũi tên và Enter, cùng thông báo trạng thái. Nó gợi ý thêm các thuộc tính ARIA và thông báo trực tiếp mô tả từng thao tác.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Make drag and drop accessible

Drag and drop is mouse-dependent by default—keyboard and screen reader users are completely locked out without proper alternatives and ARIA announcements.

Quick Reference

  • Always provide keyboard alternatives to drag and drop
  • Use aria-grabbed and aria-dropeffect (or newer attributes)
  • Announce drag operations to screen readers via live regions
  • Support both mouse/touch and keyboard interaction patterns

Check

Verify drag and drop interfaces have keyboard alternatives, proper ARIA attributes, and live region announcements.

Fix

Implement keyboard alternatives (arrow keys, Enter/Space), aria-grabbed, aria-dropeffect, and status announcements.

Explain

Explain how accessible drag and drop implementations provide equivalent functionality for keyboard and screen reader users.

Code Review

Review templates, server-rendered HTML, and shared components that output markup related to Make drag and drop accessible. Flag exact elements, attributes, and routes where the rendered HTML violates the rule.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/html/draggable-accessibility

Câu hỏi thường gặp

Vì sao cần cách thay thế bằng bàn phím?

Nếu thiếu, những người không dùng được chuột sẽ bị loại khỏi tính năng.

Live region là gì?

Đó là vùng trên trang mà trình đọc màn hình sẽ đọc khi nội dung thay đổi, có thể báo tiến trình kéo.

Skill nhắc tới thuộc tính ARIA nào?

Skill nhắc tới aria-grabbed và aria-dropeffect, hoặc các thuộc tính mới hơn đã thay thế chúng.

Chi tiết

Mô tả gốc của tác giả

Use when reviewing templates, rendered HTML, or shared components related to Make drag and drop accessible. Validate the final browser-facing markup, not just the source framework abstraction.

repo: thedaviddias/Front-End-Checklist

Độ phổ biến

Sao GitHub
75k
Vị trí xếp hạng
#2822
Giấy phép
MIT
Cập nhật
31/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự