mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-17 13:33:45 +00:00
* fix(client): Give form-control outlines their own 3:1 border role
border-medium and border-light were the only visible edge on the shared
form controls, and neither clears the WCAG 1.4.11 3:1 non-text floor in
any palette. Raising them would also darken every separator and card edge,
which the quieter dark borders deliberately keep one step off the page.
border-control is a new theme role for the outline of a field, select
trigger, dropdown, combobox trigger and OTP slot. Every bundled palette
gives it a value that clears 3:1 on each canvas a form can sit on, the
package ships the stock light and dark defaults so the outline holds before
and without a theme definition, and a custom theme that paints its own
medium border but not the new role keeps the outline it drew.
semanticTokens.spec.ts holds the 3:1 floor for the role in all six modes.
* fix(client): Keep a legacy control outline only when it clears 3:1
A theme that paints its own borders but predates border-control took its
medium border as the control outline, and a quiet one left every field
without a visible edge. The fallback now keeps that border only where it
clears 3:1 on the theme's own canvases and otherwise uses the theme's
secondary text, in both resolveTheme and the legacy applyTheme adapter.
The palette scenarios spell out their tags so the runner can find them.
* fix(client): Map legacy light and medium borders onto the control outline
Controls drew border-light (fields, dropdowns, comboboxes) or border-medium
(select, OTP) before border-control existed, so a stored theme that painted
either, or the canvases they sit on, takes the first of its light border,
its medium border, the bundled role or its secondary text that clears 3:1
on its own canvases. A theme that names none of them keeps the bundled role.
* fix(client): Never settle for a control outline that fails when a better one exists
Secondary and primary text join the candidates for a legacy theme's control
outline, and when none clears 3:1 on the theme's canvases the one that
comes closest is used rather than the secondary text by default.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| api | ||
| client | ||
| data-provider | ||
| data-schemas | ||