mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 06:14:59 +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>
75 lines
2.3 KiB
QML
75 lines
2.3 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import QmlComponents 1.0
|
|
|
|
CPaper {
|
|
id: panel
|
|
objectName: "view_mod_player"
|
|
Accessible.role: Accessible.Pane
|
|
Accessible.name: "MOD Player"
|
|
width: 420
|
|
implicitHeight: contentCol.implicitHeight + 32
|
|
|
|
ColumnLayout {
|
|
id: contentCol
|
|
anchors.fill: parent
|
|
anchors.margins: 16
|
|
spacing: 14
|
|
|
|
CText { variant: "h4"; text: "MOD Player" }
|
|
CText {
|
|
variant: "body2"
|
|
text: "Play the procedural Retro Gaming MOD and watch the
|
|
visualizer react."
|
|
}
|
|
|
|
FlexRow {
|
|
spacing: 12
|
|
CButton {
|
|
text: ModPlayer.playing
|
|
? "Replay MOD" : "Play MOD"
|
|
variant: "primary"
|
|
activeFocusOnTab: true
|
|
Accessible.role: Accessible.Button
|
|
Accessible.name: ModPlayer.playing
|
|
? "Replay MOD" : "Play MOD"
|
|
Keys.onReturnPressed:
|
|
ModPlayer.play(
|
|
"frontends/qt6/assets"
|
|
+ "/audio/retro-gaming.mod")
|
|
Keys.onSpacePressed:
|
|
ModPlayer.play(
|
|
"frontends/qt6/assets"
|
|
+ "/audio/retro-gaming.mod")
|
|
onClicked: ModPlayer.play(
|
|
"frontends/qt6/assets"
|
|
+ "/audio/retro-gaming.mod")
|
|
}
|
|
CButton {
|
|
text: "Stop"
|
|
variant: "ghost"
|
|
enabled: ModPlayer.playing
|
|
activeFocusOnTab: true
|
|
Accessible.role: Accessible.Button
|
|
Accessible.name: "Stop MOD playback"
|
|
Accessible.description:
|
|
ModPlayer.playing
|
|
? "Stop the current track"
|
|
: "No track playing"
|
|
Keys.onReturnPressed:
|
|
if (ModPlayer.playing)
|
|
ModPlayer.stop()
|
|
Keys.onSpacePressed:
|
|
if (ModPlayer.playing)
|
|
ModPlayer.stop()
|
|
onClicked: ModPlayer.stop()
|
|
}
|
|
}
|
|
|
|
CStatusBadge {
|
|
status: ModPlayer.playing ? "success" : "info"
|
|
text: ModPlayer.playing ? "Playing" : "Idle"
|
|
}
|
|
}
|
|
}
|