WCAG: TextField, ComboBox, KeyRecorder - contrast, focus, accessible roles

This commit is contained in:
Your Name
2026-02-18 21:02:07 +02:00
parent f2f80fc863
commit d40c83cc45
3 changed files with 22 additions and 13 deletions

View File

@@ -10,6 +10,9 @@ ComboBox {
property color bgColor: "#1a1a20"
property color popupColor: "#252530"
Accessible.role: Accessible.ComboBox
Accessible.name: control.displayText
delegate: ItemDelegate {
id: delegate
width: control.width
@@ -68,7 +71,7 @@ ComboBox {
context.lineTo(width, 0);
context.lineTo(width / 2, height);
context.closePath();
context.fillStyle = control.pressed ? control.accentColor : "#888888";
context.fillStyle = control.pressed ? control.accentColor : "#ABABAB";
context.fill();
}
}
@@ -89,8 +92,8 @@ ComboBox {
implicitWidth: 140
implicitHeight: 40
color: control.bgColor
border.color: control.pressed || control.activeFocus ? control.accentColor : "#40ffffff"
border.width: 1
border.color: control.pressed || control.activeFocus ? control.accentColor : SettingsStyle.borderSubtle
border.width: control.activeFocus ? SettingsStyle.focusRingWidth : 1
radius: 6
// Glow effect on focus (Simplified to just border for stability)
@@ -114,7 +117,7 @@ ComboBox {
background: Rectangle {
color: control.popupColor
border.color: "#40ffffff"
border.color: SettingsStyle.borderSubtle
border.width: 1
radius: 6
}