Add What's New dialog, accessibility labels, focus management

Add What's New dialog accessible from hamburger menu showing version
changelog. Add accessible property labels to step indicator for screen
reader support with current step/total announcements. Add focus
management on step transitions - focus moves to first interactive
element when navigating to a new step.
This commit is contained in:
2026-03-06 13:13:39 +02:00
parent ea8444f039
commit b78f1cd7c4
2 changed files with 106 additions and 0 deletions

View File

@@ -27,6 +27,10 @@ impl StepIndicator {
.margin_end(12)
.build();
container.update_property(&[
gtk::accessible::Property::Label("Wizard step indicator"),
]);
let mut dots = Vec::new();
for (i, name) in step_names.iter().enumerate() {
@@ -93,14 +97,26 @@ impl StepIndicator {
pub fn set_current(&self, index: usize) {
let dots = self.dots.borrow();
let total = dots.len();
for (i, dot) in dots.iter().enumerate() {
if i == index {
dot.icon.set_icon_name(Some("radio-checked-symbolic"));
dot.button.set_sensitive(true);
dot.label.add_css_class("accent");
// Update accessible description for screen readers
dot.button.update_property(&[
gtk::accessible::Property::Label(
&format!("Step {} of {}: {} (current)", i + 1, total, dot.label.label())
),
]);
} else if dot.icon.icon_name().as_deref() != Some("emblem-ok-symbolic") {
dot.icon.set_icon_name(Some("radio-symbolic"));
dot.label.remove_css_class("accent");
dot.button.update_property(&[
gtk::accessible::Property::Label(
&format!("Step {} of {}: {}", i + 1, total, dot.label.label())
),
]);
}
}
}