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

accesskeys

Skill này làm gì

Skill này kiểm tra xem mỗi phím tắt được đặt bằng thuộc tính accesskey có chỉ được dùng một lần trên trang hay không. Nó dành cho lập trình viên web thêm phím tắt vào liên kết hoặc nút.

Khi nào nên dùng

  • ✓Khi bạn thêm thuộc tính accesskey vào liên kết hoặc nút trên trang.
  • ✓Khi một phím tắt dường như đến nhầm phần tử hoặc không đến phần tử nào.
  • ✓Khi bạn đang xem lại template có thể lặp lại cùng một giá trị accesskey.

Liên kết skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/accesskeys/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/accesskeys/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

“Tìm mọi giá trị accesskey bị lặp trong template header và footer của website tôi và sửa chúng.”

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

Cách hoạt động

Agent quét đánh dấu trang để tìm thuộc tính accesskey, gắn cờ các giá trị trùng và gán cho mỗi phím tắt một giá trị duy nhất hoặc xóa những cái thừa.

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.

Ensure accesskey values are unique

Duplicate access keys cause conflicts where only one element (usually the first) is reachable via the shortcut, making other elements inaccessible to keyboard users.

Quick Reference

  • Each accesskey attribute value must be unique on the page
  • Duplicate access keys can lead to unpredictable browser behavior
  • Helps keyboard users navigate reliably using defined shortcuts

Check

Check for duplicate accesskey attributes across the document to ensure each shortcut is unique.

Fix

Assign unique values to each accesskey attribute or remove redundant ones to prevent shortcut conflicts.

Explain

Explain how duplicate access keys affect keyboard accessibility and browser shortcut handling.

Code Review

Review the rendered markup and interactive states that affect Ensure accesskey values are unique. Flag exact elements, roles, labels, focus behavior, or keyboard interactions that violate the rule, and note how to verify the fix with browser accessibility tooling or assistive tech.


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

Rule page: https://frontendchecklist.io/rules/accessibility/accesskeys

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

Điều gì xảy ra khi hai phần tử có cùng accesskey?

Skill nói thường chỉ phần tử đầu tiên được truy cập bằng phím tắt, nên các phần tử còn lại không thể truy cập theo cách đó.

Skill này có tự đặt phím tắt cho tôi không?

Không. Nó kiểm tra các giá trị accesskey đã có và sửa những cái trùng lặp.

Phím tắt trùng có thể gây hành vi khó đoán không?

Có. Skill lưu ý rằng accesskey trùng có thể khiến trình duyệt hoạt động khó đoán.

Chi tiết

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

Use when reviewing rendered HTML, interactive components, or design-system patterns related to Ensure accesskey values are unique. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.

repo: thedaviddias/Front-End-Checklist

Độ phổ biến

Sao GitHub
75k
Vị trí xếp hạng
#2713
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ự