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

aria-required-attr

Skill này làm gì

Skill này kiểm tra xem các vai trò ARIA có đủ thuộc tính bắt buộc hay không. Nó dành cho lập trình viên làm thanh trượt, công tắc và các widget ARIA khác.

Khi nào nên dùng

  • ✓Khi bạn làm thanh trượt, công tắc hoặc widget ARIA tùy chỉnh khác.
  • ✓Khi công nghệ hỗ trợ không báo được trạng thái hoặc giá trị của điều khiển.
  • ✓Khi bạn xem lại đánh dấu ARIA theo đặc tả.

Liên kết skill

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

“Thanh trượt tùy chỉnh của tôi không báo giá trị cho trình đọc màn hình. Tìm phần thiếu và sửa.”

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

Cách hoạt động

Agent kiểm tra mỗi vai trò với các thuộc tính bắt buộc của nó và thêm những thuộc tính còn thiếu, như aria-valuenow cho thanh trượt.

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.

Include required ARIA attributes for roles

Certain ARIA roles are incomplete without their required attributes, preventing assistive technologies from correctly communicating the element's state or value.

Quick Reference

  • Identify roles that require specific state or property attributes
  • Ensure attributes like aria-valuenow for sliders are present
  • Validate that all required ARIA attributes are correctly implemented

Check

Verify that all ARIA roles have their mandatory attributes as defined by the WAI-ARIA specification.

Fix

Add the missing required ARIA attributes to elements with specific roles (e.g., aria-valuenow for role="slider").

Explain

Explain how required ARIA attributes provide critical state information that screen readers need to function correctly.

Code Review

Review the rendered markup and interactive states that affect Include required ARIA attributes for roles. 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-required-attr

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

Vì sao thuộc tính bắt buộc quan trọng?

Skill nói chúng cung cấp cho công nghệ hỗ trợ trạng thái hoặc giá trị mà nó cần để hoạt động.

Một vai trò ví dụ là gì?

Skill dùng thanh trượt (slider) làm ví dụ, vì nó cần aria-valuenow.

Skill lấy danh sách yêu cầu ở đâu?

Nó tham chiếu đặc tả WAI-ARIA làm nguồn cho các thuộc tính bắt buộc của từng vai trò.

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 Include required ARIA attributes for roles. 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
#2734
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ự