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

autoplay-media

Skill này làm gì

Skill này kiểm tra xem media có tự phát khi trang tải hay không. Skill dành cho lập trình viên và chủ website muốn người xem tự chọn lúc nào media phát.

Khi nào nên dùng

  • ✓Khi trang bắt đầu phát âm thanh ngay khi mở.
  • ✓Khi video tự phát và không có nút tạm dừng nhìn thấy được.
  • ✓Khi bạn thêm video nền hoặc trình chiếu có media.

Liên kết skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/autoplay-media/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/autoplay-media/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 ngăn video nền trên trang chủ của tôi tự phát có tiếng và thêm nút tạm dừng.”

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

Cách hoạt động

Agent gỡ autoplay khỏi âm thanh và video. Nếu cần tự phát, agent yêu cầu media phải tắt tiếng và thêm nút tạm dừng rõ ràng, dùng được bằng bàn phím.

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.

Avoid autoplaying media

Autoplaying audio drowns out screen reader speech, startles users, and wastes bandwidth—providing user control is essential for accessibility and good UX.

Quick Reference

  • Never autoplay audio—it interferes with screen readers
  • If video must autoplay, ensure it's muted by default
  • Provide immediately accessible pause/stop controls
  • Autoplay should stop after 5 seconds or provide stop mechanism

Check

Verify no audio or video autoplays on page load. If autoplay is essential, confirm media is muted by default and pause controls are immediately accessible via keyboard within the first few tab stops.

Fix

Remove autoplay attributes from media elements. If autoplay is required, add muted attribute and provide prominent, keyboard-accessible pause controls. Consider adding a global pause button for pages with multiple media elements.

Explain

Explain how autoplaying media interferes with screen readers, startles users with cognitive disabilities, and creates barriers for users in quiet environments or with limited bandwidth.

Code Review

Review the rendered markup and interactive states that affect Avoid autoplaying media. 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/autoplay-media

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

Vì sao tự phát là vấn đề với trình đọc màn hình?

Skill nói âm thanh tự phát sẽ át giọng đọc của trình đọc màn hình.

Video có thể tự phát không?

Có, nếu mặc định tắt tiếng và có nút tạm dừng dễ tiếp cận.

Media nên tự phát trong bao lâu?

Skill gợi ý dừng sau 5 giây hoặc cho người dùng cách dừng nó.

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 Avoid autoplaying media. 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
#2751
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ự