Improve screen reader support for wizard navigation
- Announce step number and name when navigating between steps - Add accessible label to batch queue toggle button - Add accessible label to navigation view with shortcut hint - Step transitions update accessible property for screen readers
This commit is contained in:
@@ -389,6 +389,9 @@ fn build_ui(app: &adw::Application) {
|
||||
.visible(false)
|
||||
.build();
|
||||
queue_button.add_css_class("flat");
|
||||
queue_button.update_property(&[
|
||||
gtk::accessible::Property::Label("Toggle batch queue panel"),
|
||||
]);
|
||||
header.pack_start(&queue_button);
|
||||
|
||||
// Help button for per-step contextual help
|
||||
@@ -415,6 +418,9 @@ fn build_ui(app: &adw::Application) {
|
||||
// Navigation view for wizard content
|
||||
let nav_view = adw::NavigationView::new();
|
||||
nav_view.set_vexpand(true);
|
||||
nav_view.update_property(&[
|
||||
gtk::accessible::Property::Label("Wizard steps. Use Alt+Left/Right to navigate."),
|
||||
]);
|
||||
|
||||
// Build wizard pages
|
||||
let pages = crate::wizard::build_wizard_pages(&app_state);
|
||||
@@ -958,6 +964,15 @@ fn navigate_to_step(ui: &WizardUi, target: usize) {
|
||||
ui.nav_view.replace(&ui.pages[..=target]);
|
||||
ui.title.set_subtitle(&ui.pages[target].title());
|
||||
|
||||
// Announce step change for screen readers
|
||||
let step_name = ui.pages[target].title().to_string();
|
||||
let total_steps = ui.pages.len();
|
||||
ui.nav_view.update_property(&[
|
||||
gtk::accessible::Property::Label(
|
||||
&format!("Step {} of {}: {}", target + 1, total_steps, step_name)
|
||||
),
|
||||
]);
|
||||
|
||||
// Focus management - move focus to first interactive element on new step
|
||||
// Use idle callback to let the page fully render first
|
||||
let page = ui.pages[target].clone();
|
||||
|
||||
Reference in New Issue
Block a user