Add WCAG 2.2 AAA compliance and automated AT-SPI audit tool
- Bring all UI widgets to WCAG 2.2 AAA conformance across all views - Add accessible labels, roles, descriptions, and announcements - Bump focus outlines to 3px, target sizes to 44px AAA minimum - Fix announce()/announce_result() to walk widget tree via parent() - Add AT-SPI accessibility audit script (tools/a11y-audit.py) that checks SC 4.1.2, 1.1.1, 1.3.1, 2.1.1, 2.5.5, 2.5.8, 2.4.8, 2.4.9, 2.4.10, 2.1.3 with JSON report output for CI - Clean up project structure, archive old plan documents
This commit is contained in:
@@ -7,7 +7,7 @@ use crate::core::database::Database;
|
||||
use crate::core::duplicates;
|
||||
use crate::core::fuse;
|
||||
use crate::core::wayland;
|
||||
use crate::i18n::ni18n;
|
||||
use crate::i18n::{i18n, ni18n};
|
||||
use super::widgets;
|
||||
|
||||
/// Build the dashboard page showing system health and statistics.
|
||||
@@ -30,9 +30,10 @@ pub fn build_dashboard_page(db: &Rc<Database>) -> adw::NavigationPage {
|
||||
let fuse_info = fuse::detect_system_fuse();
|
||||
if !fuse_info.status.is_functional() {
|
||||
let banner = adw::Banner::builder()
|
||||
.title("FUSE is not working - some AppImages may not launch")
|
||||
.button_label("Fix Now")
|
||||
.title(&i18n("FUSE is not working - some AppImages may not launch"))
|
||||
.button_label(&i18n("Fix Now"))
|
||||
.revealed(true)
|
||||
.accessible_role(gtk::AccessibleRole::Alert)
|
||||
.build();
|
||||
banner.set_action_name(Some("win.fix-fuse"));
|
||||
content.append(&banner);
|
||||
@@ -67,9 +68,7 @@ pub fn build_dashboard_page(db: &Rc<Database>) -> adw::NavigationPage {
|
||||
.activatable(true)
|
||||
.build();
|
||||
catalog_row.set_action_name(Some("win.catalog"));
|
||||
let arrow1 = gtk::Image::from_icon_name("go-next-symbolic");
|
||||
arrow1.set_valign(gtk::Align::Center);
|
||||
catalog_row.add_suffix(&arrow1);
|
||||
catalog_row.add_suffix(&widgets::accessible_suffix_icon("go-next-symbolic", &i18n("Open catalog")));
|
||||
started_group.add(&catalog_row);
|
||||
|
||||
let menu_row = adw::ActionRow::builder()
|
||||
@@ -257,9 +256,7 @@ fn build_library_stats_group(db: &Rc<Database>) -> adw::PreferencesGroup {
|
||||
.subtitle(&total.to_string())
|
||||
.activatable(true)
|
||||
.build();
|
||||
let total_arrow = gtk::Image::from_icon_name("go-next-symbolic");
|
||||
total_arrow.set_valign(gtk::Align::Center);
|
||||
total_row.add_suffix(&total_arrow);
|
||||
total_row.add_suffix(&widgets::accessible_suffix_icon("go-next-symbolic", &i18n("View library")));
|
||||
total_row.set_action_name(Some("navigation.pop"));
|
||||
group.add(&total_row);
|
||||
|
||||
@@ -327,9 +324,7 @@ fn build_updates_summary_group(db: &Rc<Database>) -> adw::PreferencesGroup {
|
||||
badge.set_valign(gtk::Align::Center);
|
||||
updates_row.add_suffix(&badge);
|
||||
}
|
||||
let updates_arrow = gtk::Image::from_icon_name("go-next-symbolic");
|
||||
updates_arrow.set_valign(gtk::Align::Center);
|
||||
updates_row.add_suffix(&updates_arrow);
|
||||
updates_row.add_suffix(&widgets::accessible_suffix_icon("go-next-symbolic", &i18n("View updates")));
|
||||
group.add(&updates_row);
|
||||
|
||||
if with_updates > 0 {
|
||||
@@ -342,9 +337,7 @@ fn build_updates_summary_group(db: &Rc<Database>) -> adw::PreferencesGroup {
|
||||
let update_badge = widgets::status_badge("Go", "suggested");
|
||||
update_badge.set_valign(gtk::Align::Center);
|
||||
update_all_row.add_suffix(&update_badge);
|
||||
let arrow = gtk::Image::from_icon_name("go-next-symbolic");
|
||||
arrow.set_valign(gtk::Align::Center);
|
||||
update_all_row.add_suffix(&arrow);
|
||||
update_all_row.add_suffix(&widgets::accessible_suffix_icon("go-next-symbolic", &i18n("Update all apps")));
|
||||
group.add(&update_all_row);
|
||||
}
|
||||
|
||||
@@ -391,9 +384,7 @@ fn build_duplicates_summary_group(db: &Rc<Database>) -> adw::PreferencesGroup {
|
||||
.activatable(true)
|
||||
.build();
|
||||
groups_row.set_action_name(Some("win.find-duplicates"));
|
||||
let dupes_arrow = gtk::Image::from_icon_name("go-next-symbolic");
|
||||
dupes_arrow.set_valign(gtk::Align::Center);
|
||||
groups_row.add_suffix(&dupes_arrow);
|
||||
groups_row.add_suffix(&widgets::accessible_suffix_icon("go-next-symbolic", &i18n("View duplicates")));
|
||||
group.add(&groups_row);
|
||||
|
||||
if summary.total_potential_savings > 0 {
|
||||
@@ -427,9 +418,7 @@ fn build_disk_usage_group(db: &Rc<Database>) -> adw::PreferencesGroup {
|
||||
.activatable(true)
|
||||
.build();
|
||||
total_row.set_action_name(Some("win.cleanup"));
|
||||
let disk_arrow = gtk::Image::from_icon_name("go-next-symbolic");
|
||||
disk_arrow.set_valign(gtk::Align::Center);
|
||||
total_row.add_suffix(&disk_arrow);
|
||||
total_row.add_suffix(&widgets::accessible_suffix_icon("go-next-symbolic", &i18n("Clean up disk")));
|
||||
group.add(&total_row);
|
||||
|
||||
// Largest AppImages
|
||||
@@ -503,7 +492,7 @@ fn build_quick_actions_group() -> adw::PreferencesGroup {
|
||||
scan_btn.add_css_class("suggested-action");
|
||||
scan_btn.set_action_name(Some("win.scan"));
|
||||
scan_btn.update_property(&[
|
||||
gtk::accessible::Property::Label("Scan for AppImages"),
|
||||
gtk::accessible::Property::Description("Scan for AppImages in configured directories"),
|
||||
]);
|
||||
|
||||
let updates_btn = gtk::Button::builder()
|
||||
@@ -513,7 +502,7 @@ fn build_quick_actions_group() -> adw::PreferencesGroup {
|
||||
updates_btn.add_css_class("pill");
|
||||
updates_btn.set_action_name(Some("win.check-updates"));
|
||||
updates_btn.update_property(&[
|
||||
gtk::accessible::Property::Label("Check for updates"),
|
||||
gtk::accessible::Property::Description("Check all AppImages for available updates"),
|
||||
]);
|
||||
|
||||
let clean_btn = gtk::Button::builder()
|
||||
@@ -523,7 +512,7 @@ fn build_quick_actions_group() -> adw::PreferencesGroup {
|
||||
clean_btn.add_css_class("pill");
|
||||
clean_btn.set_action_name(Some("win.clean-orphans"));
|
||||
clean_btn.update_property(&[
|
||||
gtk::accessible::Property::Label("Clean orphaned desktop entries"),
|
||||
gtk::accessible::Property::Description("Remove orphaned desktop entries and icons"),
|
||||
]);
|
||||
|
||||
button_box.append(&scan_btn);
|
||||
|
||||
Reference in New Issue
Block a user