Add WCAG 2.2 AAA compliance and automated AT-SPI audit tool
This commit is contained in:
@@ -8,6 +8,7 @@ use crate::core::database::Database;
|
||||
use crate::core::discovery;
|
||||
use crate::core::inspector;
|
||||
use crate::i18n::{i18n, ni18n_f};
|
||||
use super::widgets;
|
||||
|
||||
/// Registered file info returned by the fast registration phase.
|
||||
struct RegisteredFile {
|
||||
@@ -87,6 +88,7 @@ pub fn show_drop_dialog(
|
||||
.halign(gtk::Align::Center)
|
||||
.margin_top(12)
|
||||
.build();
|
||||
image.update_property(&[gtk::accessible::Property::Label("App icon preview")]);
|
||||
dialog_ref.set_extra_child(Some(&image));
|
||||
}
|
||||
});
|
||||
@@ -130,7 +132,7 @@ pub fn show_drop_dialog(
|
||||
|
||||
// Show toast
|
||||
if added == 1 {
|
||||
toast_ref.add_toast(adw::Toast::new(&i18n("Added to your apps")));
|
||||
toast_ref.add_toast(widgets::info_toast(&i18n("Added to your apps")));
|
||||
} else if added > 0 {
|
||||
let msg = ni18n_f(
|
||||
"Added {} app",
|
||||
@@ -138,7 +140,7 @@ pub fn show_drop_dialog(
|
||||
added as u32,
|
||||
&[("{}", &added.to_string())],
|
||||
);
|
||||
toast_ref.add_toast(adw::Toast::new(&msg));
|
||||
toast_ref.add_toast(widgets::info_toast(&msg));
|
||||
}
|
||||
|
||||
// Background analysis for each file
|
||||
@@ -163,11 +165,11 @@ pub fn show_drop_dialog(
|
||||
}
|
||||
Ok(Err(e)) => {
|
||||
log::error!("Drop processing failed: {}", e);
|
||||
toast_ref.add_toast(adw::Toast::new(&i18n("Failed to add app")));
|
||||
toast_ref.add_toast(widgets::error_toast(&i18n("Failed to add app")));
|
||||
}
|
||||
Err(e) => {
|
||||
log::error!("Drop task failed: {:?}", e);
|
||||
toast_ref.add_toast(adw::Toast::new(&i18n("Failed to add app")));
|
||||
toast_ref.add_toast(widgets::error_toast(&i18n("Failed to add app")));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user