fix: add missing aria-labels to icon-only buttons for accessibility

- Sidebar close button: aria-label for screen readers
- Sidebar search clear button: aria-label
- ChatMessage raw JSON copy button: aria-label
- Added i18n keys: sidebar.close, sidebar.clearSearch (EN + FR)
This commit is contained in:
Nicolas Varrot
2026-02-13 05:42:23 +00:00
parent 72f410566a
commit de6976bae8
3 changed files with 7 additions and 1 deletions

View File

@@ -181,7 +181,7 @@ export function Sidebar({ sessions, activeSession, onSwitch, onDelete, onSplit,
</div>
<span className="font-semibold text-sm text-pc-text tracking-wide">{t('sidebar.title')}</span>
</div>
<button onClick={onClose} className="lg:hidden p-1.5 rounded-xl hover:bg-[var(--pc-hover)] text-pc-text-secondary transition-colors">
<button onClick={onClose} className="lg:hidden p-1.5 rounded-xl hover:bg-[var(--pc-hover)] text-pc-text-secondary transition-colors" aria-label={t('sidebar.close')}>
<X size={16} />
</button>
</div>
@@ -204,6 +204,7 @@ export function Sidebar({ sessions, activeSession, onSwitch, onDelete, onSplit,
<button
onClick={() => updateFilter('')}
className="absolute right-2 top-1/2 -translate-y-1/2 text-pc-text-muted hover:text-pc-text"
aria-label={t('sidebar.clearSearch')}
>
<X size={12} />
</button>