#243·typehero

[a11y] focus: 和 focus-visible: 状态

作者: PickleNik创建于 2023年7月16日更新于 2026年6月14日
标签good first issueaccessibilitytedious
  • 在默认 HTML 元素上添加 focus:outline-none
  • 使用 focus-visible:ring-2 代替 (或者如果组件已经设置了边框,则更改边框)
  • 尽可能匹配悬停效果
  • 设置 ring-blue-600 或其他颜色,以匹配主色调
  • 覆盖所有阴影输入字段,使其不具有 focus-visible:ring-offset-x

内容来源: typehero/typehero