Skip to content

Conversation

derekjackson-das
Copy link
Collaborator

@derekjackson-das derekjackson-das commented May 28, 2025

Summary

This PR addresses the accessibility issue identified in #6638. With the introduction of the new ARIAKit LLM Menu, there was a regression in that the focus indicator was no longer showing up in light mode. This PR adds focus back to the main LLM menu in lightmode. The focus-visible classes of the component were interfering with the applications own focus-visible styles in styles.css

Issue as seen in the current version: missing focus
Suggested fix in the PR request: focus on LLM menu

Changed files:

  • client/components/Chat/Menus/Endpoints/CustomMenu.tsx@line 47 - Remove focus-visible classes from Ariakit.MenuButton
  • client/components/Chat/Menus/Endpoints/ModelSelector.tsx @ line 55 - Remove focus-visible classes from button element

NOTE: This partially replaces PR #6645 to immediately meet the WCAG SC 2.4.7 Focus Visible and allowing more time to work on the other issue in the PR #6645 which I made its own issue #7608, to improve the visibility of the submenu's active items.

Change Type

  • Bug fix (non-breaking change which fixes an issue)

Testing

Manual keyboard testing: In light mode, use the tab key to ove keyboard focus to the LLM menu. The black focus outline around the menu button should be visible and match the focus style of other interactive elements (black, solid, 2px).

Test Configuration:

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • Local unit tests pass with my changes

@derekjackson-das derekjackson-das requested a review from berry-13 May 28, 2025 18:52
@rubentalstra rubentalstra added the ♿ a11y Accessibility label May 29, 2025
@danny-avila danny-avila changed the title Fix(a11y): Add focus indicator to new ARIAkit menu component in light mode. ☀️ a11y: Add Missing Focus to Model Selector in Light Mode May 29, 2025
@danny-avila danny-avila changed the base branch from main to dev May 29, 2025 12:27
@danny-avila danny-avila merged commit b846f56 into danny-avila:dev May 29, 2025
6 checks passed
@derekjackson-das derekjackson-das deleted the llm/menu/focus branch May 29, 2025 12:48
timmanik pushed a commit to timmanik/LibreChat that referenced this pull request Jun 1, 2025
derhelge pushed a commit to derhelge/LibreChat that referenced this pull request Jun 1, 2025
arthurolivierfortin pushed a commit to arthurolivierfortin/LibreChat-Fork that referenced this pull request Jun 4, 2025
kenshinsamue pushed a commit to intelequia/LibreChat that referenced this pull request Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♿ a11y Accessibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants