Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (antigravity): reject a self-closing <label> as a wrapper tell (#4156)

[._.]/ Adam Eivy7576fb7f0316
diff --git a/client/src/a11yConventions.test.js b/client/src/a11yConventions.test.js
index 0cac0b2868..f85afb3122 100644
--- a/client/src/a11yConventions.test.js
+++ b/client/src/a11yConventions.test.js
@@ -607,8 +607,10 @@ function localLabelWrapperNames(src) {
const body = src.slice(bodyStart, bodyEnd);
// {children} must sit inside a <label> — no </label> may intervene, or a
// component rendering `<label>Header</label>{children}<label>Footer</label>`
- // would register as a wrapper and exempt controls it never labels.
- if (/<label\b[^>]*>(?:(?!<\/label>)[\s\S])*?\{\s*children\s*\}/.test(body)) names.add(match[1]);
+ // would register as a wrapper and exempt controls it never labels. The
+ // opening tag must also not be self-closing (`<label … />` wraps nothing,
+ // so anything after it is outside the label).
+ if (/<label\b(?:[^>]*[^/>])?>(?:(?!<\/label>)[\s\S])*?\{\s*children\s*\}/.test(body)) names.add(match[1]);
}
labelWrapperNamesBySource.set(src, names);
return names;