mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-21 13:34:19 -06:00
Compare Documents: name the unlabeled Original, Revised and author fields
The Compare dialog's "Another file" radio, Revised path box and author box had no accessible name. After the status bar's two-pass layout, Harness::run settles on a fully laid-out dialog and the accessibility check failed. Existing catalog strings only; no layout change.
This commit is contained in:
@@ -204,7 +204,8 @@ fn compare_ui(app: &mut WordApp, ui: &mut Ui, f: &mut CompareForm) -> bool {
|
||||
heading(ui, "Original document");
|
||||
ui.radio_value(&mut f.original_current, true, tl!("This document"));
|
||||
ui.horizontal(|ui| {
|
||||
ui.radio_value(&mut f.original_current, false, "");
|
||||
// Empty visible label (the path field carries "Another file"); name the radio for the a11y check.
|
||||
ui.radio_value(&mut f.original_current, false, "").on_hover_text(tl!("Another file"));
|
||||
ui.add_enabled(browse, egui::TextEdit::singleline(&mut f.original).desired_width(170.0).hint_text(tl!("Another file")));
|
||||
if ui.add_enabled(browse, egui::Button::new(tl!("Browse…"))).clicked() {
|
||||
pick = Some(false);
|
||||
@@ -216,14 +217,15 @@ fn compare_ui(app: &mut WordApp, ui: &mut Ui, f: &mut CompareForm) -> bool {
|
||||
crate::rtl::vertical(ui, |ui| {
|
||||
heading(ui, "Revised document");
|
||||
ui.horizontal(|ui| {
|
||||
ui.add_enabled(browse, egui::TextEdit::singleline(&mut f.revised).desired_width(170.0));
|
||||
ui.add_enabled(browse, egui::TextEdit::singleline(&mut f.revised).desired_width(170.0))
|
||||
.on_hover_text(tl!("Revised document"));
|
||||
if ui.add_enabled(browse, egui::Button::new(tl!("Browse…"))).clicked() {
|
||||
pick = Some(true);
|
||||
}
|
||||
});
|
||||
ui.horizontal(|ui| {
|
||||
ui.label(tl!("Label changes with:"));
|
||||
ui.add(egui::TextEdit::singleline(&mut f.author).desired_width(120.0));
|
||||
let lab = ui.label(tl!("Label changes with:"));
|
||||
ui.add(egui::TextEdit::singleline(&mut f.author).desired_width(120.0)).labelled_by(lab.id);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user