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

86 lines
2.4 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
Rectangle {
id: hero
objectName: "heroSection"
Accessible.role: Accessible.Pane
Accessible.name: "Hero section"
property string headline: "Build entire stacks visually,
from public sites to secure admin panels."
property string subhead: "MetaBuilder layers marketing, observability,
and runtime tooling into a single declarative canvas."
signal primaryAction()
signal secondaryAction()
radius: 16
color: "#11172d"
border.color: "#25315b"
border.width: 1
padding: 32
anchors.horizontalCenter: parent ? parent.horizontalCenter : undefined
ColumnLayout {
anchors.fill: parent
spacing: 18
Text {
text: hero.headline
font.pixelSize: 36
font.bold: true
color: "#ffffff"
wrapMode: Text.Wrap
}
Text {
text: hero.subhead
font.pixelSize: 18
color: "#b1bfd7"
wrapMode: Text.Wrap
}
RowLayout {
spacing: 12
Button {
text: "Explore levels"
font.pixelSize: 15
activeFocusOnTab: true
Accessible.role: Accessible.Button
Accessible.name: "Explore levels"
Keys.onReturnPressed:
hero.primaryAction()
Keys.onSpacePressed:
hero.primaryAction()
onClicked: hero.primaryAction()
background: Rectangle {
radius: 12
color: "#5a7dff"
border.color: "#4b6ef9"
border.width: 1
}
}
Button {
text: "View live demo"
font.pixelSize: 15
activeFocusOnTab: true
Accessible.role: Accessible.Button
Accessible.name: "View live demo"
Keys.onReturnPressed:
hero.secondaryAction()
Keys.onSpacePressed:
hero.secondaryAction()
onClicked: hero.secondaryAction()
background: Rectangle {
radius: 12
color: "#11162b"
border.color: "#5a7dff"
border.width: 1
}
}
}
}
}