Chuyển đến nội dung
Skillpedia
Giao diện (UI/UX)280k · #126

accessibility

Skill này làm gì

Công cụ này giúp đảm bảo website và app dễ dùng với mọi người, kể cả người khiếm thị hoặc khó vận động. Nó kiểm tra xem các phần tử trên màn hình có rõ ràng, thao tác được và tương thích với trình đọc màn hình không.

Khi nào nên dùng

  • ✓Khi xây dựng một website hoặc app mới.
  • ✓Khi rà soát một website hoặc app đang có.
  • ✓Khi bạn muốn mọi người đều dùng được sản phẩm số của mình.

Liên kết skill

https://github.com/affaan-m/ECC/blob/main/pi/core/skills/accessibility/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/affaan-m/ECC/blob/main/pi/core/skills/accessibility/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

“Hãy kiểm tra xem nút “lưu” này có dễ truy cập với người chỉ dùng bàn phím không.”

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

Cách hoạt động

Công cụ phân tích cách mô tả các phần tử tương tác (nút, liên kết) và cách người dùng di chuyển qua chúng. Nó đảm bảo màu sắc, kích thước và cách tương tác hoạt động tốt với công nghệ 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.

Accessibility (WCAG 2.2)

This skill ensures that digital interfaces are Perceivable, Operable, Understandable, and Robust (POUR) for all users, including those using screen readers, switch controls, or keyboard navigation. It focuses on the technical implementation of WCAG 2.2 success criteria.

When to Use

  • Defining UI component specifications for Web, iOS, or Android.
  • Auditing existing code for accessibility barriers or compliance gaps.
  • Implementing new WCAG 2.2 standards like Target Size (Minimum) and Focus Appearance.
  • Mapping high-level design requirements to technical attributes (ARIA roles, traits, hints).

Core Concepts

  • POUR Principles: The foundation of WCAG (Perceivable, Operable, Understandable, Robust).
  • Semantic Mapping: Using native elements over generic containers to provide built-in accessibility.
  • Accessibility Tree: The representation of the UI that assistive technologies actually "read."
  • Focus Management: Controlling the order and visibility of the keyboard/screen reader cursor.
  • Labeling & Hints: Providing context through aria-label, accessibilityLabel, and contentDescription.

How It Works

Step 1: Identify the Component Role

Determine the functional purpose (e.g., Is this a button, a link, or a tab?). Use the most semantic native element available before resorting to custom roles.

Step 2: Define Perceivable Attributes

  • Ensure text contrast meets 4.5:1 (normal) or 3:1 (large/UI).
  • Add text alternatives for non-text content (images, icons).
  • Implement responsive reflow (up to 400% zoom without loss of function).

Step 3: Implement Operable Controls

  • Ensure a minimum 24x24 CSS pixel target size (WCAG 2.2 SC 2.5.8).
  • Verify all interactive elements are reachable via keyboard and have a visible focus indicator (SC 2.4.11).
  • Provide single-pointer alternatives for dragging movements.

Step 4: Ensure Understandable Logic

  • Use consistent navigation patterns.
  • Provide descriptive error messages and suggestions for correction (SC 3.3.3).
  • Implement "Redundant Entry" (SC 3.3.7) to prevent asking for the same data twice.

Step 5: Verify Robust Compatibility

  • Use correct Name, Role, Value patterns.
  • Implement aria-live or live regions for dynamic status updates.

Accessibility Architecture Diagram

flowchart TD
  UI["UI Component"] --> Platform{Platform?}
  Platform -->|Web| ARIA["WAI-ARIA + HTML5"]
  Platform -->|iOS| SwiftUI["Accessibility Traits + Labels"]
  Platform -->|Android| Compose["Semantics + ContentDesc"]

  ARIA --> AT["Assistive Technology (Screen Readers, Switches)"]
  SwiftUI --> AT
  Compose --> AT

Cross-Platform Mapping

Feature Web (HTML/ARIA) iOS (SwiftUI) Android (Compose)
Primary Label aria-label / <label> .accessibilityLabel() contentDescription
Secondary Hint aria-describedby .accessibilityHint() Modifier.semantics { stateDescription = ... }
Action Role role="button" .accessibilityAddTraits(.isButton) Modifier.semantics { role = Role.Button }
Live Updates aria-live="polite" .accessibilityLiveRegion(.polite) Modifier.semantics { liveRegion = LiveRegionMode.Polite }

Examples

Web: Accessible Search

<form role="search">
  <label for="search-input" class="sr-only">Search products</label>
  <input type="search" id="search-input" placeholder="Search..." />
  <button type="submit" aria-label="Submit Search">
    <svg aria-hidden="true">...</svg>
  </button>
</form>

iOS: Accessible Action Button

Button(action: deleteItem) {
    Image(systemName: "trash")
}
.accessibilityLabel("Delete item")
.accessibilityHint("Permanently removes this item from your list")
.accessibilityAddTraits(.isButton)

Android: Accessible Toggle

Switch(
    checked = isEnabled,
    onCheckedChange = { onToggle() },
    modifier = Modifier.semantics {
        contentDescription = "Enable notifications"
    }
)

Anti-Patterns to Avoid

…

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

“Nguyên tắc POUR” là gì?

Đây là bốn nền tảng để làm nội dung dễ truy cập: Perceivable (thông tin phải nhận biết được), Operable (người dùng thao tác được), Understandable (thông tin dễ hiểu) và Robust (hoạt động tốt trên nhiều công nghệ).

“Focus” là gì?

Đó là phần tử đang được chọn trên màn hình, nơi các lệnh từ bàn phím hoặc trình đọc màn hình được gửi đến. Điều quan trọng là nó phải nhìn thấy được và dễ điều khiển.

Tại sao kích thước nút tối thiểu quan trọng?

Nút nhỏ khó bấm hoặc chạm, nhất là với người khó vận động hoặc khi dùng màn hình nhỏ. Kích thước tối thiểu giúp chúng dễ thao tác hơn.

Chi tiết

Mô tả gốc của tác giả

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels, accessibility traits and hints, focus management, contrast, target size, and screen-reader support. Use when building or auditing UI for accessibility compliance, keyboard navigation, or screen-reader support.

repo: affaan-m/ECC

Độ phổ biến

Sao GitHub
280k
Vị trí xếp hạng
#126
Giấy phép
MIT
Cập nhật
15/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ự