mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +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>
74 lines
2.1 KiB
QML
74 lines
2.1 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import QmlComponents 1.0
|
|
|
|
CDialog {
|
|
id: root
|
|
objectName: "dialog_delete_dropdown"
|
|
Accessible.role: Accessible.Dialog
|
|
Accessible.name: title
|
|
activeFocusOnTab: true
|
|
title: "Delete Dropdown"
|
|
|
|
property var dropdown: null
|
|
|
|
signal confirmed()
|
|
signal cancelled()
|
|
|
|
ColumnLayout {
|
|
spacing: 16; width: 400
|
|
CAlert {
|
|
severity: "warning"
|
|
text: "This action cannot be " +
|
|
"undone. Any forms " +
|
|
"referencing this dropdown " +
|
|
"will need to be updated."
|
|
Layout.fillWidth: true
|
|
}
|
|
CText {
|
|
variant: "body1"
|
|
text: root.dropdown
|
|
? "Are you sure you want to " +
|
|
"delete \"" +
|
|
root.dropdown.name +
|
|
"\" with " +
|
|
root.dropdown.options.length +
|
|
" options?"
|
|
: ""
|
|
wrapMode: Text.WordWrap
|
|
}
|
|
FlexRow {
|
|
Layout.fillWidth: true
|
|
spacing: 8
|
|
Item { Layout.fillWidth: true }
|
|
CButton {
|
|
text: "Cancel"
|
|
variant: "ghost"
|
|
activeFocusOnTab: true
|
|
Accessible.role: Accessible.Button
|
|
Accessible.name: "Cancel"
|
|
Keys.onReturnPressed:
|
|
root.cancelled()
|
|
Keys.onSpacePressed:
|
|
root.cancelled()
|
|
onClicked: root.cancelled()
|
|
}
|
|
CButton {
|
|
text: "Delete"
|
|
variant: "danger"
|
|
activeFocusOnTab: true
|
|
Accessible.role: Accessible.Button
|
|
Accessible.name: "Confirm delete"
|
|
Accessible.description:
|
|
"Permanently delete this " +
|
|
"dropdown"
|
|
Keys.onReturnPressed:
|
|
root.confirmed()
|
|
Keys.onSpacePressed:
|
|
root.confirmed()
|
|
onClicked: root.confirmed()
|
|
}
|
|
}
|
|
}
|
|
}
|