fix(a11y): add visible focus rings to footer links (Closes #122) - #202
Open
SakethSumanBathini wants to merge 1 commit into
Open
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout. (1)
🔇 Additional comments (2)
📝 WalkthroughWalkthroughFooter links on the landing and legal pages now show keyboard focus indicators. The GitHub link also includes accessible external-link labeling and hides its decorative icon from assistive technology. ChangesFooter accessibility
Estimated code review effort: 1 (Trivial) | ~4 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #122
A correction to the premise first
The footer doesn't have social icons.
LandingPage.tsx:408-414has a single GitHub link with a visible "GitHub" text label, sitting beside Terms and Privacy text links:There's no icon-only social row anywhere in the codebase — I checked for Twitter, LinkedIn, Discord and mail icons and found none. So "descriptive tooltips for each social icon" and "hover animations on icons" have nothing to apply to.
Two of the four proposals are real, and this PR does those.
What's fixed
Keyboard focus. None of the six footer links across the two footers had a visible focus ring — only the browser default, which is close to invisible against these muted greys (
text-zinc-400). A keyboard user tabbing through the footer genuinely couldn't tell where they were.Now using
focus-visible:ring-2 focus-visible:ring-indigo-500with an offset, matching the convention already established inEditorImportPane.tsx:360rather than introducing a second focus style.focus-visiblerather thanfocusmeans mouse clicks don't leave a ring behind.Both footers, not one. The issue mentions the landing page footer;
LegalPage.tsxhas its own with three more links in the same state. Fixing one and leaving the other would be a strange result for anyone tabbing between the two pages.A tooltip and a new-tab announcement on the GitHub link.
rel="noopener noreferrer"was already correct, but nothing told a screen reader the link opens elsewhere — so there's now ansr-onlynote alongside thetitle, and the decorative icon isaria-hidden.What I deliberately didn't do
The issue suggests
transform: translateY(-3px)on hover. That link sits inline with Terms and Privacy — lifting it on hover would break the baseline alignment of the row. Transform animations suit standalone icon buttons, which is what the proposal had in mind; for text links in a row, the existingtransition-colorsis the right treatment and it's already there.Happy to add a lift if the footer later gains a proper icon row.
Verification
npm run buildinfrontend/completes cleanly. The change is CSS classes and two accessibility attributes — no logic touched.Worth a manual check before merge: tab through the footer on both
/and/termsand confirm the ring is visible in light and dark mode. I can't verify the rendered contrast from here.Note on assignment
@asiya2123 filed this and is still assigned alongside me. I've asked on the issue whether they have work in progress — if so I'll close this in favour of theirs.
Summary by CodeRabbit