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

accessible-tables

Skill này làm gì

Skill này kiểm tra xem bảng dữ liệu có dùng tiêu đề và chú thích đúng cách để trình đọc màn hình giải thích được không. Nó dành cho lập trình viên web hiển thị bảng giá, kết quả hoặc lịch trình.

Khi nào nên dùng

  • ✓Khi bạn đang làm một bảng dữ liệu trên trang web.
  • ✓Khi một bảng có các ô tiêu đề chưa được đánh dấu là tiêu đề.
  • ✓Khi một bảng đang được dùng để dàn trang thay vì chứa dữ liệu.

Liên kết skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/accessible-tables/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/accessible-tables/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 bảng giá của tôi để trình đọc màn hình biết con số nào thuộc gói nào.”

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

Cách hoạt động

Agent xem đánh dấu bảng để tìm ô tiêu đề, thuộc tính scope và chú thích, rồi xác nhận bảng chỉ dùng cho dữ liệu, không dùng cho bố cụ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.

Use semantic table markup for screen readers

Screen readers read table data cell-by-cell—without proper headers, users hear meaningless numbers without context. 'Row 3, Column 2: $99' vs just '$99'.

Quick Reference

  • Use <th> elements for headers with scope='col' or scope='row'
  • Add <caption> to describe the table's purpose
  • Never use tables for layout—use CSS Grid or Flexbox instead
  • Use id/headers for complex tables with merged cells
  • For simple tables with a clear adjacent section heading, missing scope is often a stronger finding than missing <caption>
  • Prefer one strong table-semantics finding over multiple weaker enhancements on the same simple table

Check

Verify tables use proper th elements with scope, caption or aria-labelledby, and semantic table structure.

Fix

Add proper table headers with scope attributes, captions for context, and ensure tables are not used for layout.

Explain

Explain how proper table markup helps screen reader users understand data relationships and navigate table content.

Code Review

Review the rendered markup and interactive states that affect Use semantic table markup for screen readers. 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/accessible-tables

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

Scope trong bảng là gì?

Nó cho trình đọc màn hình biết tiêu đề áp dụng cho cột hay cho hàng.

Mọi bảng có cần chú thích không?

Skill nói chú thích có ích, nhưng với một bảng đơn giản có tiêu đề rõ ràng, thiếu scope thường là lỗi quan trọng hơn cần sửa.

Tôi có thể dùng bảng để dàn trang không?

Không. Skill nói nên dùng CSS Grid hoặc Flexbox để dàn trang.

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 semantic table markup for screen readers. 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
#2711
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ự