layer5 icon indicating copy to clipboard operation
layer5 copied to clipboard

[Accessibility][UI] Restore visible keyboard focus styles across Layer5 site

Open DS123-ally opened this issue 3 months ago • 1 comments

Current Behavior

Keyboard users cannot reliably see which interactive element is focused while navigating the Layer5 site with Tab / Shift+Tab.

The global stylesheet removes focus outlines for every element:

*:focus {
  outline: none;
}

This rule is currently in:

  • src/sections/app.style.js, around lines 23-25

There are also several component-level styles that remove outlines without always replacing them with an accessible visible focus indicator. Examples found by searching outline: none include:

  • src/reusecore/Accordion/accordion.style.js
  • src/reusecore/Search/searchbox.style.js
  • src/sections/Adventures-Callout/discuss.style.js
  • src/sections/Blog/Blog-sidebar/blogSidebar.style.js
  • src/sections/Discuss-Callout/discuss.style.js
  • src/sections/General/Faq/faqSection.style.js
  • src/sections/General/Navigation/navigation.style.js
  • src/sections/DeployServiceMesh/DeployServiceMesh.style.js
  • src/sections/Learn/Workshop-grid/WorkshopsGrid.style.js
  • src/sections/Projects/Sistent/sistent.style.js
  • src/sections/Meshery/Meshery-integrations/Integration.style.js
  • src/components/Features-carousel/FeaturesCarousel.style.js
  • src/collections/handbook/faq/faq-wrapper.style.js

When focus indicators are removed globally, keyboard and assistive-technology users lose an important visual cue for where they are on the page.

Expected Behavior

Interactive elements should show a clear, visible focus indicator when reached by keyboard navigation. This includes:

  • Navigation links and menu items
  • Buttons
  • Form inputs and selects
  • Search controls
  • Carousel controls
  • FAQ / accordion controls
  • Modal controls
  • Any other clickable or keyboard-focusable UI

The focus indicator should be visible in both light and dark themes.

Suggested Fix

Replace the global *:focus { outline: none; } rule with an accessible :focus-visible style and audit component-level outline removals.

Example direction:

*:focus-visible {
  outline: 2px solid ${({ theme }) => theme.secondaryColor};
  outline-offset: 3px;
}

Some components may need local focus styles if the global style does not fit their layout, background, or theme context.

Acceptance Criteria

  • [ ] Remove or replace the global *:focus { outline: none; } rule in src/sections/app.style.js.
  • [ ] Add a visible keyboard focus style using :focus-visible or an equivalent accessible pattern.
  • [ ] Confirm focus states are visible in both light and dark modes.
  • [ ] Audit obvious component-level outline: none usage and add replacement focus styling where needed.
  • [ ] Verify keyboard navigation with Tab / Shift+Tab across common UI areas such as header navigation, buttons, forms, FAQ/accordion controls, and modals.
  • [ ] Ensure mouse interactions are not visually noisy, preferably by using :focus-visible instead of applying the ring to every click focus.

Why This Matters

Visible keyboard focus is a core accessibility and UX requirement. Removing focus outlines globally can make the site difficult or impossible to navigate for users who rely on keyboards or assistive technologies.

DS123-ally avatar Aug 14 '26 14:08 DS123-ally

@Sbragul26 i want work on this issue can you assign me.

DS123-ally avatar Aug 14 '26 14:08 DS123-ally