White text on the blue buttons drops below 4.5:1 contrast on hover
维护者通常 1 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 68/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- tailwindcss, typescript
调研方向
Read the 17 hover:brightness-110 usages in src, including src/components/signup/header-buttons.ts; note that the PRIMARY stack is not on main yet. Compare the existing hover colours in the consent form and sign-in link, then apply the chosen treatment across the affected buttons and check that white text stays above 4.5:1 contrast. Done means no affected white-text bg-brand button uses hover:brightness-110 and the listed lint, typecheck, knip, and test commands pass.
由索引模型根据 Issue 内容生成。
描述
Needs your OK: choosing the hover colour is a small design call. Swap pipeline:proposed for pipeline:ready to have it built.
What happens
- The hover style lightens the button. Most blue (
bg-brand) buttons usehover:brightness-110. That includes the signup header'sPRIMARYstyle (src/components/signup/header-buttons.tson the "Publish and share" stack): Publish and share, Share, and Reopen signup (#608). In all, 17 places insrcusehover:brightness-110. - The contrast drops below what normal-size text needs. At rest, white text on
#1f6febis 4.63:1, which passes WCAG 1.4.3's 4.5:1. Brightened by 10% to about#227aff, it's 3.97:1. These labels are 13–15px, so they need 4.5:1. - Axe doesn't catch it. It checks the colours at rest, not on hover.
- Found while reviewing #608.
Fix, in outline
- Darken on hover instead of lightening. Use
hover:bg-[#1658c4], the hover colour the OAuth consent button (src/app/oauth/consent/[uid]/consent-form.tsx) and the sign-in link (src/app/login/confirm/sign-in-link.tsx) already use. Better still, add it as abrand-hovercolour intailwind.config.tsand use that everywhere. - Leave the disabled style alone.
disabled:brightness-90onPRIMARYdarkens, so it's fine as it is. - Or drop the hover change on these buttons altogether. That's simpler, but gives no hover feedback.
Watch for
PRIMARYonly exists on the "Publish and share" stack (#571 → #581), not onmainyet. Build this after that stack lands, or changePRIMARYthere as well as the other 16 places.- The text never gets bigger on hover. These buttons stay "normal text" for WCAG, so 4.5:1 is the bar on hover too, not 3:1.
Choices this makes
Darkening on hover, with the colour the consent and sign-in buttons already use, rather than a new one.
Done when
- No
bg-brandbutton with white text useshover:brightness-110. - White on the hover colour is at least 4.5:1 (
#1658c4gives 6.51:1). pnpm lint && pnpm typecheck && pnpm knip && pnpm testpass.
- 主要语言
- TypeScript
- 星标
- 19
- 派生
- 4
- 平均合并
- 21 小时 41 分钟
- 30 天内合并 PR
- 201
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
richshaw/OpenSignup 的其他 Issue
-
The cookies table is cut off on a phone, hiding how long each cookie lasts可能已有人在做 @richshaw 今天认领。 未关闭bug pipeline:building pipeline:ux
难度 1/5 1 小时以内 新手友好度 85/100
richshaw/OpenSignup#749 · 已指派 1 人 ·
维护者通常 1 天内回复
-
A New signup description with line breaks can pass the form, then be refused as too long可能已有人在做 @richshaw 于 1 天前认领。 未关闭bug pipeline:building pipeline:ux
难度 2/5 1-3 小时 新手友好度 85/100
richshaw/OpenSignup#722 · 已指派 1 人 ·
维护者通常 1 天内回复
-
enhancement pipeline:proposed pipeline:ux
难度 2/5 1-3 小时 新手友好度 72/100
richshaw/OpenSignup#654 ·
维护者通常 1 天内回复
-
Magic Compose's reading screen quotes the description in a blue box that no other screen uses可能已有人在做 @richshaw 今天认领。 未关闭enhancement pipeline:building pipeline:ux
难度 3/5 1-2 天 新手友好度 75/100
richshaw/OpenSignup#751 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
enhancement pipeline:proposed pipeline:ux
难度 3/5 1-2 天 新手友好度 75/100
richshaw/OpenSignup#750 ·
维护者通常 1 天内回复
查看 richshaw/OpenSignup 的全部 Issue
相似的 Issue
-
难度 2/5 1 小时以内 新手友好度 86/100
WilliamSmithEdward/xlide_vscode#1564 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
a2ui-project/a2ui#3809 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
esphome/device-builder-frontend#2064 ·
维护者通常 1 天内回复
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 61/100
lingdojo/kana-dojo#33465 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复