feat(a11y): tokenize destructive-action colors to Theme.danger family
Replace hardcoded danger reds (#ef4444 / #dc2626 / alpha variants) with the Theme danger tokens so destructive affordances follow every theme, including the high-contrast and colorblind palettes (WCAG 1.4.1, P4 #10). - ContextMenuItem: danger row icon tint + label -> Theme.danger. - MultiSelectBar: danger button hover bg -> Theme.danger-hover, border -> Theme.danger-border, icon tint -> Theme.danger. - BlacklistManagerView: per-row remove + Clear-All control + confirm modal danger button -> Theme.danger / danger-bg. The solid-filled confirm button uses Theme.danger.darker(0.12) for hover (mirroring how accent-pressed is derived) instead of Theme.danger-hover, which is a translucent ghost-surface tint and would wash out a filled button (and is lighter in some a11y palettes). These danger surfaces already pair an icon + verb label with color, so color is reinforcement (not the sole signal); no HC-gated borders added here to avoid touching shared button geometry. cc
This commit is contained in:
3 files changed
+20
-11
No files matched your search
@@ -26,10 +26,10 @@ component BulkButton inherits Rectangle {
|
||||
border-radius: Radius.sm;
|
||||
opacity: root.enabled-when ? 1.0 : 0.4;
|
||||
background: root.danger
|
||||
? (ta.has-hover ? #ef444433 : transparent)
|
||||
? (ta.has-hover ? Theme.danger-hover : transparent)
|
||||
: (ta.has-hover ? Theme.surface-hover : transparent);
|
||||
border-width: root.danger ? 1px : 0px;
|
||||
border-color: #ef4444;
|
||||
border-color: Theme.danger-border;
|
||||
|
||||
QbzIcon {
|
||||
source: root.icon;
|
||||
@@ -38,7 +38,7 @@ component BulkButton inherits Rectangle {
|
||||
x: Math.round((parent.width - self.width) / 2 / 1px) * 1px;
|
||||
y: Math.round((parent.height - self.height) / 2 / 1px) * 1px;
|
||||
tint: root.danger
|
||||
? #ef4444
|
||||
? Theme.danger
|
||||
: (ta.has-hover ? Theme.text-primary : Theme.text-secondary);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user