mirror of
https://github.com/coder/coder.git
synced 2026-10-16 14:48:56 +08:00
fix(site/src/components): raise breadcrumb and topbar separator contrast (#30546)
Raises the contrast of the `/` separators in `BreadcrumbSeparator` and `TopbarDivider` to meet WCAG 1.4.11 (non-text contrast, 3:1). Fixes DEQ-163 and DEQ-418. Both separators now use `content-secondary`, which measures 7.78:1 against `surface-primary` in dark mode and 7.69:1 in light mode. The previous colors were `content-disabled` (1.90:1 dark, 2.55:1 light) and `border-default` (1.34:1 dark, 1.27:1 light). `border-secondary` and `content-disabled` resolve to the same values, so neither was a viable fix. Affects every breadcrumb in the settings layouts (deployment, organization, user, template, workspace) and the topbar dividers on the workspace page and the template version editor. | | Before | After | |---|---|---| | Breadcrumb (`/deployment/overview`) |  |  | | Topbar divider (template version editor) |  |  | In the running app (dark theme), both separators now compute to `rgb(161, 161, 170)` on `rgb(9, 9, 11)`. The topbar divider measured `rgb(39, 39, 42)` before the change. Design note: both tickets carry `ux-input-needed`. The separator now has the same weight as secondary text. A dedicated, subtler separator token at about 3:1 is an alternative if design prefers. > [!NOTE] > This PR was generated by Coder Agents on behalf of @chrifro.
This commit is contained in:
@@ -86,7 +86,7 @@ export const BreadcrumbSeparator: React.FC<
|
||||
role="presentation"
|
||||
aria-hidden="true"
|
||||
className={cn(
|
||||
"text-content-disabled [&>svg]:w-3.5 [&>svg]:h-3.5",
|
||||
"text-content-secondary [&>svg]:w-3.5 [&>svg]:h-3.5",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
|
||||
@@ -54,7 +54,7 @@ export const TopbarDivider: React.FC<
|
||||
Omit<React.ComponentProps<"span">, "children">
|
||||
> = ({ className, ...props }) => {
|
||||
return (
|
||||
<span {...props} className={cn("text-border", className)}>
|
||||
<span {...props} className={cn("text-content-secondary", className)}>
|
||||
/
|
||||
</span>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user