Topic: Turning off navigation effects also removes the keyboard focus indicator

Zara Bell free asked 6 days ago


We removed visual click effects from the sidebar for a quieter interface. Mouse navigation looks fine, but keyboard users can no longer see which link has focus. Our override includes outline: none on all sidebar links.

The links are still reachable with Tab and activate correctly with Enter. Is the focus outline part of the ripple effect, or should we restore it separately while leaving the click animation disabled?


Mateusz Lazaru staff answered 5 days ago


Restore a visible keyboard focus style separately. A focus indicator identifies the currently focused control; it should remain available even when decorative click feedback is disabled. The outline: none override is the likely reason it disappeared.

Remove that broad override or provide a clear :focus-visible rule with sufficient contrast against the sidebar background. Test the entire sidebar using Tab, Shift+Tab and Enter, including links that already have an active-page appearance.

.sidebar a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

https://mdbootstrap.com/docs/react/navigation/sidenav/



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: MDB5 9.0.0
  • Device: Desktop
  • Browser: Firefox
  • OS: Linux
  • Provided sample code: No
  • Provided link: No