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>
46 lines
1.3 KiB
QML
46 lines
1.3 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import QmlComponents 1.0
|
|
|
|
ColumnLayout {
|
|
id: root
|
|
objectName: "selector_encryption"
|
|
Accessible.role: Accessible.RadioGroup
|
|
Accessible.name: "Encryption"
|
|
|
|
property var options: ["None", "TLS", "SSL"]
|
|
property int selectedIndex: 1
|
|
|
|
signal selectionChanged(int index)
|
|
|
|
Layout.fillWidth: true
|
|
spacing: 4
|
|
|
|
CText { variant: "caption"; text: "Encryption" }
|
|
|
|
RowLayout {
|
|
Layout.fillWidth: true
|
|
spacing: 8
|
|
|
|
Repeater {
|
|
model: root.options
|
|
delegate: CButton {
|
|
text: modelData
|
|
variant: root.selectedIndex === index
|
|
? "primary" : "ghost"
|
|
size: "sm"
|
|
activeFocusOnTab: true
|
|
Accessible.role: Accessible.RadioButton
|
|
Accessible.name: modelData + " encryption"
|
|
Accessible.description:
|
|
root.selectedIndex === index
|
|
? modelData + " selected"
|
|
: modelData + " not selected"
|
|
Keys.onReturnPressed: root.selectionChanged(index)
|
|
Keys.onSpacePressed: root.selectionChanged(index)
|
|
onClicked: root.selectionChanged(index)
|
|
}
|
|
}
|
|
}
|
|
}
|