mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 22:04:56 +00:00
Second-pass a11y work across all 12 component groups. Every interactive element now has activeFocusOnTab, Keys.onReturnPressed/SpacePressed, and context-aware Accessible.name/description bindings. Highlights: - Dialogs: keyboard handlers with enabled-guard on confirm buttons - CDropdownMenu: full keyboard nav (Up/Down/Enter/Escape) - CLoginForm: explicit KeyNavigation.tab chain (username→password→submit) - CNotificationBell: dynamic "3 notifications"/"No notifications" name - CJobProgressBar: Accessible.minimumValue/maximumValue/currentValue - CExecutionStatusDot: "Execution status: Running/Passed/Failed" binding - CKeyboardShortcuts: invisible Repeater exposes all shortcuts to a11y tree - CDataTable rows: "Row N of M" descriptions - Canvas elements: Accessible.Canvas role + keyboard zoom (+/- keys) - DropdownExpandedList: focus-highlight extended to :activeFocus - Dynamic names reflect loading state (e.g. "Signing in, please wait") Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
44 lines
1.2 KiB
QML
44 lines
1.2 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
import QmlComponents 1.0
|
|
|
|
Rectangle {
|
|
id: root
|
|
objectName: "progressbar_job"
|
|
Accessible.role: Accessible.ProgressBar
|
|
Accessible.name: "Job progress: " + root.progress + "%"
|
|
Accessible.description: root.status !== ""
|
|
? "Status: " + root.status
|
|
: "Job is in progress"
|
|
Accessible.minimumValue: 0
|
|
Accessible.maximumValue: 100
|
|
Accessible.currentValue: root.progress
|
|
Layout.fillWidth: true
|
|
Layout.preferredHeight: 20
|
|
color: "transparent"
|
|
|
|
property int progress: 0
|
|
property string status: ""
|
|
|
|
Rectangle {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
width: parent.width; height: 6; radius: 3
|
|
color: Theme.border
|
|
|
|
Rectangle {
|
|
width: parent.width * (root.progress / 100)
|
|
height: parent.height; radius: 3
|
|
color: root.status === "failed" ? Theme.error
|
|
: root.status === "completed" ? Theme.success
|
|
: Theme.primary
|
|
}
|
|
}
|
|
|
|
CText {
|
|
anchors.right: parent.right
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
variant: "caption"; text: root.progress + "%"
|
|
}
|
|
}
|