WCAG: GlowButton, SettingsSection, SettingsItem - contrast, accessible roles

This commit is contained in:
Your Name
2026-02-18 21:02:06 +02:00
parent a6cf9efbcb
commit f2f80fc863
3 changed files with 12 additions and 5 deletions

View File

@@ -6,12 +6,15 @@ Button {
text: "Button" text: "Button"
property color accentColor: "#00f2ff" property color accentColor: "#00f2ff"
Accessible.role: Accessible.Button
Accessible.name: control.text
activeFocusOnTab: true
contentItem: Text { contentItem: Text {
text: control.text text: control.text
font.pixelSize: 13 font.pixelSize: 13
font.bold: true font.bold: true
color: control.hovered ? "white" : "#9499b0" color: control.hovered ? "white" : "#ABABAB"
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight elide: Text.ElideRight
@@ -25,8 +28,8 @@ Button {
opacity: control.down ? 0.7 : 1.0 opacity: control.down ? 0.7 : 1.0
color: control.hovered ? Qt.rgba(1, 1, 1, 0.1) : Qt.rgba(1, 1, 1, 0.05) color: control.hovered ? Qt.rgba(1, 1, 1, 0.1) : Qt.rgba(1, 1, 1, 0.05)
radius: 8 radius: 8
border.color: control.hovered ? control.accentColor : Qt.rgba(1, 1, 1, 0.1) border.color: control.hovered ? control.accentColor : SettingsStyle.borderSubtle
border.width: 1 border.width: control.activeFocus ? SettingsStyle.focusRingWidth : 1
Behavior on border.color { ColorAnimation { duration: 200 } } Behavior on border.color { ColorAnimation { duration: 200 } }
Behavior on color { ColorAnimation { duration: 200 } } Behavior on color { ColorAnimation { duration: 200 } }

View File

@@ -18,7 +18,9 @@ Rectangle {
property string description: "" property string description: ""
property alias control: controlContainer.data property alias control: controlContainer.data
property bool showSeparator: true property bool showSeparator: true
Accessible.name: root.label
Accessible.role: Accessible.Row
Behavior on color { ColorAnimation { duration: 150 } } Behavior on color { ColorAnimation { duration: 150 } }
HoverHandler { HoverHandler {

View File

@@ -9,6 +9,8 @@ ColumnLayout {
default property alias content: contentColumn.data default property alias content: contentColumn.data
property string title: "" property string title: ""
Accessible.name: root.title + " settings group"
Accessible.role: Accessible.Grouping
// Section Header // Section Header
Text { Text {