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

label-content-name-mismatch

Skill này làm gì

Skill này kiểm tra nhãn hiển thị có khớp với tên mà công cụ hỗ trợ đọc hay không. Skill dành cho lập trình viên xây nút, liên kết và điều khiển có thuộc tính ARIA.

Khi nào nên dùng

  • ✓Khi người dùng điều khiển bằng giọng nói đọc tên nút nhìn thấy nhưng không có gì xảy ra.
  • ✓Khi aria-label của nút khác với văn bản hiển thị.
  • ✓Khi bạn rà soát các điều khiển tùy chỉnh về trợ năng.

Liên kết skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/label-content-name-mismatch/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/label-content-name-mismatch/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ể kiểm tra xem nhãn nút của tôi có khớp với những gì trình đọc màn hình và điều khiển giọng nói đọc ra không?”

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

Cách hoạt động

Agent so sánh văn bản hiển thị với giá trị aria-label và aria-labelledby. Agent gợi ý đưa đúng văn bản hiển thị lên đầu tên truy cập đượ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.

Align visible labels with accessible names

When the visible label doesn't match the accessible name, voice control users may find it impossible to interact with the element by speaking its name.

Quick Reference

  • Visible text should be part of the accessible name (ARIA label)
  • Ensure speech-to-text users can trigger controls by their visible name
  • Maintain consistency between what is seen and what is read by tech

Check

Compare the visible text of buttons and links with their 'aria-label' or 'aria-labelledby' attributes to ensure the visible text is included in the accessible name.

Fix

Update the ARIA attribute to include the exact string of the visible label text at the beginning of the accessible name.

Explain

Explain how a mismatch between visible labels and accessible names breaks the experience for users of voice recognition software.

Code Review

Review the rendered markup and interactive states that affect Align visible labels with accessible names. 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/label-content-name-mismatch

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

Vì sao người dùng giọng nói cần nhãn khớp nhau?

Skill nói người dùng giọng nói thường đọc tên hiển thị của điều khiển, nên tên truy cập được phải chứa tên đó.

Văn bản hiển thị nên đặt ở đâu trong nhãn?

Skill gợi ý đặt đúng văn bản nhãn hiển thị ở đầu tên truy cập được.

Làm sao kiểm tra kết quả sửa?

Skill gợi ý dùng công cụ trợ năng của trình duyệt hoặc công nghệ hỗ 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 Align visible labels with accessible names. 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
#2910
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ự