Add WCAG 2.2 AAA compliance and automated AT-SPI audit tool
This commit is contained in:
@@ -7,6 +7,7 @@ use crate::core::database::Database;
|
||||
use crate::core::notification;
|
||||
use crate::core::report;
|
||||
use crate::core::security;
|
||||
use crate::i18n::{i18n, i18n_f};
|
||||
use super::widgets;
|
||||
|
||||
/// Build the security scan report as a full navigation page.
|
||||
@@ -46,6 +47,7 @@ pub fn build_security_report_page(db: &Rc<Database>) -> adw::NavigationPage {
|
||||
scan_button.connect_clicked(move |btn| {
|
||||
btn.set_sensitive(false);
|
||||
btn.set_label("Scanning...");
|
||||
widgets::announce(btn.upcast_ref::<gtk::Widget>(), "Scanning for vulnerabilities");
|
||||
let btn_clone = btn.clone();
|
||||
let db_refresh = db_scan.clone();
|
||||
let stack_refresh = stack_ref.clone();
|
||||
@@ -162,6 +164,7 @@ pub fn build_security_report_page(db: &Rc<Database>) -> adw::NavigationPage {
|
||||
|
||||
btn_clone.set_sensitive(false);
|
||||
btn_clone.set_label("Exporting...");
|
||||
widgets::announce(btn_clone.upcast_ref::<gtk::Widget>(), "Exporting report");
|
||||
let btn_done = btn_clone.clone();
|
||||
let toast_done = toast_for_save.clone();
|
||||
let db_bg = db_for_save.clone();
|
||||
@@ -187,11 +190,11 @@ pub fn build_security_report_page(db: &Rc<Database>) -> adw::NavigationPage {
|
||||
.and_then(|n| n.to_str())
|
||||
.unwrap_or("report");
|
||||
toast_done.add_toast(
|
||||
adw::Toast::new(&format!("Report saved as {}", filename)),
|
||||
widgets::info_toast(&i18n_f("Report saved as {filename}", &[("{filename}", filename)])),
|
||||
);
|
||||
}
|
||||
_ => {
|
||||
toast_done.add_toast(adw::Toast::new("Failed to export report"));
|
||||
toast_done.add_toast(widgets::error_toast(&i18n("Failed to export report")));
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -408,7 +411,14 @@ fn build_app_findings_group(
|
||||
let cve_row = adw::ActionRow::builder()
|
||||
.title(&format!("{} ({})", cve.cve_id, severity))
|
||||
.subtitle(&subtitle)
|
||||
.subtitle_selectable(true)
|
||||
.build();
|
||||
cve_row.update_property(&[
|
||||
gtk::accessible::Property::Description(&format!(
|
||||
"{} severity vulnerability in {}. {}",
|
||||
severity, lib_name, subtitle,
|
||||
)),
|
||||
]);
|
||||
expander.add_row(&cve_row);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user