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

anchor-smooth-scroll

Skill này làm gì

Skill này kiểm tra cách các liên kết cùng trang cuộn trên website. Nó dành cho lập trình viên muốn liên kết nhảy thoải mái với người nhạy cảm với chuyển động.

Khi nào nên dùng

  • ✓Khi trang web của bạn dùng cuộn mượt cho các liên kết trong cùng một trang.
  • ✓Khi khách đã yêu cầu giảm chuyển động trong cài đặt thiết bị.
  • ✓Khi người dùng bàn phím theo một liên kết nhảy nhưng focus không đến được đích.

Liên kết skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/anchor-smooth-scroll/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/anchor-smooth-scroll/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

“Đảm bảo các liên kết mục lục của tôi nhảy ngay lập tức với người thích giảm chuyển động.”

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

Cách hoạt động

Agent kiểm tra các quy tắc cuộn mượt, giới hạn chúng trong cài đặt giảm chuyển động (prefers-reduced-motion), và xác nhận focus chuyển đến phần đích.

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.

Provide instant anchor scroll option

Smooth scroll animations can trigger vertigo, nausea, and disorientation for users with vestibular disorders—instant navigation is safer and often faster.

Quick Reference

  • Disable smooth scroll when prefers-reduced-motion is set
  • Use CSS scroll-behavior: smooth with media query check
  • Ensure focus moves to anchor target for keyboard users
  • Provide instant scroll as default or fallback

Check

Click anchor links (same-page navigation) and verify smooth scrolling is disabled when prefers-reduced-motion is set. Confirm anchor navigation works correctly with keyboard and screen readers.

Fix

Use scroll-behavior: smooth only within a prefers-reduced-motion media query check. Provide instant scrolling as the default or reduced-motion fallback. Ensure focus moves to the anchor target.

Explain

Explain how animated scroll transitions can cause motion sickness and disorientation for users with vestibular disorders, and why instant navigation is often preferable for accessibility.

Code Review

Review the rendered markup and interactive states that affect Provide instant anchor scroll option. 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/anchor-smooth-scroll

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

Vì sao cuộn mượt có thể là vấn đề?

Skill nói cuộn có hoạt ảnh có thể gây chóng mặt hoặc mất phương hướng với người có rối loạn tiền đình.

prefers-reduced-motion là gì?

Đó là cài đặt thiết bị cho trang biết khách muốn ít hoạt ảnh hơn.

Focus có cần chuyển không?

Có. Skill nói focus nên chuyển đến đích của neo để người dùng bàn phím tiếp tục đúng chỗ.

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 Provide instant anchor scroll option. 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
#2719
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ự