Skip to content

ui: do not use links for trophies without href#19335

Merged
ornicar merged 4 commits intolichess-org:masterfrom
Simek:ui-profile-no-trophies-empty-links
Feb 8, 2026
Merged

ui: do not use links for trophies without href#19335
ornicar merged 4 commits intolichess-org:masterfrom
Simek:ui-profile-no-trophies-empty-links

Conversation

@Simek
Copy link
Contributor

@Simek Simek commented Feb 6, 2026

Why

Spotted that all trophies are rendered as links (a), but not all of them have an URL set. Having empty links causes the incorrect cursor on hover and is an a11y issue.

How

Introduce maybeLink helper in UserBits, alter trophies render with optional URL to use the helper instead hardcoded a tag. Ensure correct cursor on hover by disabling user selection (since some trophies are custom font characters).

Preview

Kapture.2026-02-06.at.18.59.12.mp4

@Simek
Copy link
Contributor Author

Simek commented Feb 6, 2026

Hmm, after looking at players profile on PROD this issue might be exaggerated locally, by seeded data. Looks like only "Verified account" trophy is a problem on actual live deployment.

LMK how do you want me to proceed, I can simplify the PR and only apply the check for verified thorny inline, or just drop the idea and only retain the small SCSS change.

@ornicar
Copy link
Collaborator

ornicar commented Feb 6, 2026

from your video preview (thanks for these <3) it looks like marathon trophies are not links? but they should be https://lichess.org/@/Gakolchess765

@Simek
Copy link
Contributor Author

Simek commented Feb 7, 2026

Yup, it's the flaw of locally seeded data. Did not realized it earlier, only right after push, when I visited several profiles on PROD.

@ornicar ornicar merged commit 081973a into lichess-org:master Feb 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants