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

table-headers

Skill này làm gì

Skill này kiểm tra các bảng dữ liệu có dùng ô tiêu đề với scope đúng hay không. Skill dành cho lập trình viên và người biên tập xây dựng bảng trên website.

Khi nào nên dùng

  • ✓Khi một bảng dữ liệu dùng ô thường ở chỗ lẽ ra phải là ô tiêu đề.
  • ✓Khi các ô tiêu đề không có thuộc tính scope.
  • ✓Khi một đợt rà soát bằng trình đọc màn hình cho biết bảng khó hiểu.

Liên kết skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/table-headers/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/table-headers/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ảng HTML của tôi trông ổn, nhưng trình đọc màn hình đọc lại khó hiểu. Làm sao để sửa tiêu đề?”

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

Cách hoạt động

Agent đổi các ô tiêu đề sang phần tử header đúng chuẩn và thêm giá trị scope. Điều này cho công nghệ hỗ trợ biết mỗi tiêu đề mô tả một cột hay một hàng.

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.

Define proper table headers

Properly defined headers allow screen readers to announce the context for each data cell, making complex tables understandable.

Quick Reference

  • Use <th> for all table headers, not <td>
  • Apply scope="col" or scope="row" to clarify header relationship
  • Ensure every data cell is associated with at least one header
  • In simple tables, prefer fixing header associations before escalating to caption-level recommendations
  • Missing scope="col" on a straightforward header row is often the clearest first fix

Check

Check that all data tables use <th> elements for headers with appropriate scope attributes.

Fix

Convert header cells to <th> and add the correct scope attribute.

Explain

Explain how <th> and scope help assistive technologies communicate the structure of data tables.

Code Review

Review the rendered markup and interactive states that affect Define proper table headers. 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/table-headers

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

scope làm gì?

Scope cho công nghệ hỗ trợ biết một tiêu đề áp dụng cho cột hay cho hàng.

Bảng đơn giản có được sửa giống bảng phức tạp không?

Với bảng đơn giản, skill nói rằng thường nên sửa liên kết tiêu đề trước. Bảng phức tạp có thể cần thêm công việc.

Tiêu đề nên dùng phần tử nào?

Tiêu đề nên dùng phần tử th, không dùng td.

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 Define proper table headers. 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
#3046
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ự