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`) | ![breadcrumb
before](https://raw.githubusercontent.com/coder/coder/pr-assets/fix-separator-contrast/breadcrumb-before.png)
| ![breadcrumb
after](https://raw.githubusercontent.com/coder/coder/pr-assets/fix-separator-contrast/breadcrumb-after.png)
|
| Topbar divider (template version editor) | ![topbar
before](https://raw.githubusercontent.com/coder/coder/pr-assets/fix-separator-contrast/topbar-before.png)
| ![topbar
after](https://raw.githubusercontent.com/coder/coder/pr-assets/fix-separator-contrast/topbar-after.png)
|

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:
christin
2026-10-13 09:19:45 +02:00
committed by GitHub
parent 1320c010af
commit bc445defd6
2 changed files with 2 additions and 2 deletions
@@ -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>
);