Files
metabuilder/qml/MetaBuilder/CGodUserCard.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

66 lines
1.7 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QmlComponents 1.0
CCard {
id: root
objectName: "card_god_user"
Accessible.role: Accessible.ListItem
Accessible.name: user ? user.username : ""
required property var user
property bool isDark: false
signal demote()
Layout.fillWidth: true
RowLayout {
Layout.fillWidth: true
spacing: 16
CAvatar { initials: root.user.initials }
ColumnLayout {
spacing: 4
Layout.fillWidth: true
FlexRow {
spacing: 8
CText { variant: "subtitle1"; text: root.user.username }
CBadge { text: "L" + root.user.level
badgeColor: Theme.primary }
CBadge { text: root.user.role; badgeColor: Theme.secondary }
}
FlexRow {
spacing: 8
CText { variant: "caption"; text: "Tenant: " + root.user.tenant
color: Theme.textSecondary }
}
}
CStatusBadge {
status: root.user.status === "online"
? "success" : root.user.status === "away" ? "warning" : "error"
text: root.user.status
}
CButton {
text: "Manage"
variant: "ghost"
size: "sm"
activeFocusOnTab: true
Accessible.role: Accessible.Button
Accessible.name: "Manage " + root.user.username
Accessible.description:
"Open management options for "
+ root.user.username
Keys.onReturnPressed: root.demote()
Keys.onSpacePressed: root.demote()
onClicked: root.demote()
}
}
}