You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Enhance accessibility in dialogs and wizard components
- Added focusable properties to dialog titles and messages for improved screen reader navigation.
- Registered new focus groups for error, storage removal, and quit confirmation dialogs to streamline focus management.
- Updated WizardContainer to include focusable elements for title and body text, ensuring better accessibility.
- Adjusted focus group order to maintain consistent navigation flow across components.
text:qsTr("The storage device was removed while writing, so the operation was cancelled. Please reinsert the device or select a different one to continue.")
171
190
wrapMode:Text.WordWrap
172
191
font.pixelSize:Style.fontSizeDescription
@@ -175,6 +194,9 @@ ApplicationWindow {
175
194
Layout.fillWidth:true
176
195
Accessible.role:Accessible.StaticText
177
196
Accessible.name: text
197
+
Accessible.focusable:true
198
+
focusPolicy:Qt.TabFocus
199
+
activeFocusOnTab:true
178
200
}
179
201
180
202
RowLayout {
@@ -206,13 +228,17 @@ ApplicationWindow {
206
228
207
229
// Register focus groups when component is ready
208
230
Component.onCompleted: {
231
+
registerFocusGroup("content", function(){
232
+
return [quitTitle, quitMessage]
233
+
}, 0)
209
234
registerFocusGroup("buttons", function(){
210
235
return [quitNoButton, quitYesButton]
211
-
}, 0)
236
+
}, 1)
212
237
}
213
238
214
239
// Dialog content
215
240
Text {
241
+
id: quitTitle
216
242
text:qsTr("Are you sure you want to quit?")
217
243
font.pixelSize:Style.fontSizeHeading
218
244
font.family:Style.fontFamilyBold
@@ -221,9 +247,13 @@ ApplicationWindow {
221
247
Layout.fillWidth:true
222
248
Accessible.role:Accessible.Heading
223
249
Accessible.name: text
250
+
Accessible.focusable:true
251
+
focusPolicy:Qt.TabFocus
252
+
activeFocusOnTab:true
224
253
}
225
254
226
255
Text {
256
+
id: quitMessage
227
257
text:qsTr("Raspberry Pi Imager is still busy. Are you sure you want to quit?")
0 commit comments