跳到正文
Skillpedia
网站与界面(前端)75k · #3010

scrolljacking

它能做什么

这个技能检查网站是否改变了原生滚动,例如滚动速度、方向或逐页跳转,并去掉这些改动。它面向希望滚动感觉自然、人人都舒适的前端开发者。

适用场景

  • ✓你请智能体检查网站是否改变了滚动方式的时候。
  • ✓访客反映滚动感觉卡顿、跳动或难以控制的时候。
  • ✓你在添加自定义滚动效果,并希望它们不会干扰导航的时候。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/scrolljacking/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/scrolljacking/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“访客说我网站上的滚动感觉很奇怪,而且会跳动。请帮我去掉所有改变滚动方式的代码吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会查找覆盖滚动速度、方向或在滚动时触发导航的 JavaScript。它会移除或调整这些代码,并保留必要的自定义效果,同时提供关闭该效果的方式。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Avoid scrolljacking and custom scroll behavior

Scrolljacking breaks user expectations, interferes with assistive technologies, and creates unpredictable experiences that frustrate users with motor impairments or cognitive disabilities.

Quick Reference

  • Never override native scroll speed or direction
  • Avoid scroll-triggered navigation (one page per scroll)
  • Scrolljacking breaks assistive technologies and user expectations
  • If custom scrolling is essential, provide a way to disable it

Check

Test scrolling behavior and verify it feels native. Check that scroll speed is not modified, scroll direction is not inverted, and scroll events are not hijacked for animations or navigation without user consent.

Fix

Remove JavaScript that overrides default scroll behavior. If custom scrolling is essential, respect prefers-reduced-motion and provide a way to disable custom scroll effects.

Explain

Explain how scrolljacking disrupts expected navigation patterns, interferes with assistive technologies, and creates unpredictable experiences for users with motor impairments or cognitive disabilities.

Code Review

Review the rendered markup and interactive states that affect Avoid scrolljacking and custom scroll behavior. 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/scrolljacking

常见问题

什么是 scrolljacking?

这是指网站改变了正常的滚动行为,使滚动操作无法按访客预期移动页面。

谁会受到影响?

这个技能说,它可能让有运动障碍或认知障碍的用户感到沮丧,并干扰辅助技术。

如果确实需要自定义滚动效果怎么办?

这个技能说,应尊重减少动效设置,并提供关闭该效果的方式。

详情

作者的原始描述

Use when reviewing rendered HTML, interactive components, or design-system patterns related to Avoid scrolljacking and custom scroll behavior. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#3010
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能