Restore visible focus outlines for keyboard accessibility#5829
Restore visible focus outlines for keyboard accessibility#5829DhyaniKavya wants to merge 3 commits intosugarlabs:masterfrom
Conversation
|
✅ All Jest tests passed! This PR is ready to merge. |
|
@walterbender Looks good to me. Although I'm not certain if the linting was necessary. |
|
@Commanderk3 Thank you for reviewing |
|
@walterbender @omsuneri Please review the changes . If anything needs to change, I am open to address it. |
vanshika2720
left a comment
There was a problem hiding this comment.
@DhyaniKavya The accessibility fix is correct and appreciated. However, this PR includes large formatting-only changes which make review difficult.
Could you please separate the focus outline fix into a minimal PR and move formatting changes into a separate formatting-only PR?
zealot-zew
left a comment
There was a problem hiding this comment.
we wouldn't be needing this as focus is present for the specific buttons.
|
Please resolve the conflict. Otherwise it looks good. |
|
Sure . I will resolve them asap |
|
❌ Some Jest tests failed. Please check the logs and fix the issues before merging. Failed Tests: |
|
❌ Some Jest tests failed. Please check the logs and fix the issues before merging. Failed Tests: |
issue: #5828
Problem:-
A global CSS rule removes focus outlines from all elements:
*:focus { outline: none; }
-This prevents visible focus indicators across the interface.
-Keyboard users cannot identify the currently focused element
-Focus visibility is essential for navigation using the Tab key
-Removing outlines creates an accessibility barrier
-Violates WCAG 2.4.7 (Focus Visible) guidelines
-While the UI appears unchanged for mouse users, keyboard and assistive technology users lose critical navigation feedback.
Solution:-
-This PR restores visible focus indicators while preserving the visual design.
-removes the global suppression of focus outlines
-introduces an accessible :focus-visible style
-ensures focus rings appear for keyboard navigation only
-does not affect layout, spacing, or existing UI behavior
Changes Made:-
-Files modified:
css/activities.css
-> removed global *:focus { outline: none; } rule
-> added accessible :focus-visible styling
css/style.css
-> ensured consistent focus-visible styling (if applicable)
Testing Performed:-
-Manual Verification
-Navigated interface using the Tab key
-Verified visible focus indicator appears on interactive elements
-Confirmed mouse clicks do not show unnecessary focus rings
-Verified no layout or visual regressions
-Confirmed focus order remains logical
-Automated Checks
CSS lint: ✅ no syntax issues
Build: ✅ successful
Impact:-
-Restores visible focus indicators for keyboard users
-Improves accessibility and usability
-Aligns with WCAG accessibility guidelines
-Enhances inclusive user experience
-No breaking changes
Notes:-
This change is intentionally minimal and non-breaking. It restores accessibility compliance while maintaining the existing visual design. The implementation uses :focus-visible to ensure focus indicators appear only during keyboard navigation.
Happy to adjust styling if maintainers prefer a different focus appearance.