From 7761779c70ef5fbdea1fc513fb1dc2188543eca3 Mon Sep 17 00:00:00 2001 From: vangel76 Date: Mon, 26 Oct 2026 19:21:46 +0100 Subject: [PATCH] a11y audit: hold the machine-dependent Media Browser scenario to its upper bound The Media Browser opens on the home folder, so a runner with fewer files finds fewer controls and the 'improved, lower the entry' check failed in CI. The entry stays an upper bound. Co-Authored-By: Claude Sonnet 5.5 --- crates/ui-egui/tests/ui_accessibility_audit.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/tests/ui_accessibility_audit.rs b/crates/ui-egui/tests/ui_accessibility_audit.rs index 44210cf96..c9444bf9f 100644 --- a/crates/ui-egui/tests/ui_accessibility_audit.rs +++ b/crates/ui-egui/tests/ui_accessibility_audit.rs @@ -27,6 +27,11 @@ use serde_json::json; /// Groups that must be clean. A group is the first part of a scenario name (before the `:`). const FIXED: &[&str] = &["EffectsPresets", "Settings", "RenderQueue", "Project"]; +/// Scenarios whose content is the machine's own folder listing (the Media Browser opens on the +/// home folder), so a runner with fewer files finds fewer controls. They are held to the upper bound +/// only: the "improved, lower the entry" check would fail on any machine with a different home. +const MACHINE_DEPENDENT: &[&str] = &["MediaBrowser:default"]; + /// (scenario, findings, of them unnamed controls) per not-yet-fixed scenario, as measured in the /// shared docking layout (Effect Controls with one Gaussian Blur on the layer, every other panel /// as it opens). A ratchet: a number may only go down, never up; when a pass over a panel lowers @@ -383,7 +388,7 @@ fn fixed_panels_have_no_unnamed_or_roleless_controls_and_the_others_do_not_get_w let (allowed, allowed_unnamed) = BASELINE.iter().find(|(k, ..)| k == name).map_or((0, 0), |(_, v, u)| (*v, *u)); if *n > allowed || *unnamed > allowed_unnamed { off.push(format!("{name}: {n} findings ({unnamed} unnamed), the baseline allows {allowed} ({allowed_unnamed}); a panel must not get worse")); - } else if *n < allowed || *unnamed < allowed_unnamed { + } else if (*n < allowed || *unnamed < allowed_unnamed) && !MACHINE_DEPENDENT.contains(&name.as_str()) { off.push(format!("{name}: improved to {n} findings ({unnamed} unnamed); lower its BASELINE entry to ({n}, {unnamed})")); } }