Files
metabuilder/qml/MetaBuilder/CAdminStatsBar.qml
johndoe6345789 d9ca84628b feat(a11y): deep keyboard accessibility pass across all QML components
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>
2026-03-19 20:53:53 +00:00

68 lines
1.8 KiB
QML

import QtQuick
import QtQuick.Layouts
import QmlComponents 1.0
/**
* CAdminStatsBar.qml - Stats bar showing entity counts with colored accents
*
* Usage:
* CAdminStatsBar {
* stats: [
* { label: "Total Users", value: 8, accent: "#4CAF50" },
* { label: "Active Sessions", value: 6, accent: "#2196F3" }
* ]
* }
*/
Rectangle {
id: root
objectName: "bar_admin_stats"
Accessible.role: Accessible.Pane
Accessible.name: "Admin Statistics"
property var stats: [] // Array of { label, value, accent }
property bool isDark: Theme.mode === "dark"
Layout.fillWidth: true
Layout.preferredHeight: 88
color: Theme.surface
radius: 0
RowLayout {
anchors.fill: parent
anchors.margins: 12
spacing: 12
Repeater {
model: root.stats
delegate: CCard {
Layout.fillWidth: true
Layout.fillHeight: true
Accessible.role: Accessible.StaticText
Accessible.name: modelData.label
+ ": " + String(modelData.value)
RowLayout {
Layout.fillWidth: true
spacing: 8
Rectangle {
width: 4
Layout.fillHeight: true
color: modelData.accent
radius: 2
}
ColumnLayout {
Layout.fillWidth: true
spacing: 2
CText { variant: "caption"; text: modelData.label
color: Theme.textSecondary }
CText { variant: "h3"; text: String(modelData.value) }
}
}
}
}
}
}