mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🔼 a11y: Proper attributes for the side panel toggle button (#4559)
- added aria-expanded attribute to indicate the panel's expanded/collapsed state - added aria-controls attribute to specify the element controlled by the button - updated aria-label using the localize function for better description
This commit is contained in:
parent
b939e24f67
commit
262176fec4
1 changed files with 3 additions and 1 deletions
|
|
@ -34,7 +34,9 @@ export default function NavToggle({
|
|||
>
|
||||
<TooltipAnchor
|
||||
side={side === 'right' ? 'left' : 'right'}
|
||||
aria-label={`toggle-${side === 'left' ? 'chat-history' : 'controls'}-nav`}
|
||||
aria-label={side === 'left' ? localize('com_ui_chat_history') : localize('com_ui_controls')}
|
||||
aria-expanded={navVisible}
|
||||
aria-controls={side === 'left' ? 'chat-history-nav' : 'controls-nav'}
|
||||
id={`toggle-${side}-nav`}
|
||||
onClick={onToggle}
|
||||
role="button"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue