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

aria-allowed-attr

Skill này làm gì

Skill này kiểm tra xem các thuộc tính ARIA chỉ được dùng ở nơi vai trò của chúng cho phép. Nó dành cho lập trình viên làm thành phần có khả năng tiếp cận với ARIA.

Khi nào nên dùng

  • ✓Khi bạn thêm thuộc tính ARIA vào thành phần tùy chỉnh.
  • ✓Khi trình đọc màn hình đọc một phần tử khác với mong đợi.
  • ✓Khi bạn xem lại code thành phần để tìm lỗi ARIA.

Liên kết skill

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

“Kiểm tra đánh dấu dropdown tùy chỉnh của tôi xem có thuộc tính ARIA nào không thuộc về vai trò của nó.”

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

Cách hoạt động

Agent xem vai trò của từng phần tử và các thuộc tính ARIA của nó, rồi xóa hoặc sửa mọi thuộc tính mà vai trò không hỗ trợ.

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.

Use only allowed ARIA attributes for each role

Invalid ARIA attributes are ignored by screen readers or may cause them to misinterpret the element's purpose, leading to a broken experience for users with disabilities.

Quick Reference

  • Each ARIA role only supports a specific set of ARIA attributes
  • Using unsupported attributes can confuse assistive technologies
  • Ensures the accessibility tree remains valid and meaningful

Check

Verify that all ARIA attributes used on elements are valid for their assigned WAI-ARIA roles.

Fix

Remove or correct ARIA attributes that are not supported by the element's current ARIA role.

Explain

Explain why using only role-supported ARIA attributes is necessary for proper screen reader communication.

Code Review

Review the rendered markup and interactive states that affect Use only allowed ARIA attributes for each role. 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/aria-allowed-attr

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

Điều gì xảy ra khi một thuộc tính ARIA không được phép?

Skill nói nó có thể bị bỏ qua, hoặc khiến trình đọc màn hình hiểu sai phần tử.

Điều này có thay thế việc test với công nghệ hỗ trợ thật không?

Không. Skill khuyến nghị kiểm tra kết quả bằng công cụ khả năng tiếp cận hoặc công nghệ hỗ trợ thực tế.

Skill kiểm tra những phần tử nào?

Mọi phần tử có thuộc tính ARIA, kể cả các widget tùy chỉnh.

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 Use only allowed ARIA attributes for each role. 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
#2723
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ự