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

62 lines
1.8 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QmlComponents 1.0
CDialog {
id: deleteRecordDialog
objectName: "dialog_delete_record"
Accessible.role: Accessible.Dialog
Accessible.name: title
activeFocusOnTab: true
title: "Delete " + entity
property string entity: ""
property string recordId: ""
property bool useLiveData: false
signal confirmed()
signal cancelled()
ColumnLayout {
width: 360; spacing: 16
CAlert { Layout.fillWidth: true; severity: "warning"
text: "This action cannot be undone." }
CText {
Layout.fillWidth: true; variant: "body1"
text: recordId
? "Are you sure you want to delete record " + recordId + "?"
: "Delete this record?"
}
FlexRow {
Layout.fillWidth: true; Layout.topMargin: 8; spacing: 8
Item { Layout.fillWidth: true }
CButton {
text: "Cancel"
variant: "ghost"
size: "sm"
activeFocusOnTab: true
Accessible.role: Accessible.Button
Accessible.name: "Cancel"
Keys.onReturnPressed: cancelled()
Keys.onSpacePressed: cancelled()
onClicked: cancelled()
}
CButton {
text: "Delete"
variant: "danger"
size: "sm"
activeFocusOnTab: true
Accessible.role: Accessible.Button
Accessible.name: "Confirm delete"
Accessible.description:
"Permanently delete record " +
recordId
Keys.onReturnPressed: confirmed()
Keys.onSpacePressed: confirmed()
onClicked: confirmed()
}
}
}
}