Repository navigation
Description
Summary
gate-40 form-label-association cannot see the association that @nextcloud/vue
text fields actually create, so every correctly-labelled NcTextField in the
fleet is reported as unlabelled. Measured in openregister: 11 false positives,
and the shape is not repo-specific — it is how nc-vue is documented and used
everywhere.
Worse, the remediation the gate's own docblock prescribes (input-id) is not a
prop on these components in nc-vue 9.9.0, so following the gate's advice ships a
meaningless attribute and still does not create an association — the association
was already there.
The evidence
NcInputField (which NcTextField wraps) renders the id prop directly onto
its <input> element.
node_modules/@nextcloud/vue/dist/chunks/NcInputField-5Sg6EUP6.mjs (nc-vue 9.9.0):
createElementVNode("input", mergeProps(_ctx.$attrs, {
id: __props.id,
ref: "input",
"aria-describedby": ariaDescribedby.value,
"aria-live": "polite",
class: ["input-field__input", __props.inputClass],
disabled: __props.disabled,
...So this markup is a correct, working HTML association — the browser resolves
for="dolphin-endpoint" to the real <input>:
<label for="dolphin-endpoint">Dolphin API Endpoint</label>
<NcTextField id="dolphin-endpoint" v-model="fileSettings.dolphinApiEndpoint" />gate-40 reports it as nctextfield-without-label-prop.
Why the checker misses it
lib/check_form_labels.py accepts, for NC_PROP_COMPONENTS, only a label /
input-label prop or an input-id that matches a <label for>:
if name in NC_PROP_COMPONENTS:
v = _attr(attrs, 'input-id')
if v and _norm_expr(v) in label_for:
return True
return FalseTwo lines above, the native branch does exactly the right thing — it accepts a
plain id that matches a <label for>:
if name in NATIVE:
v = _attr(attrs, 'id')
if v and _norm_expr(v) in label_for:
return TrueThe Nc* branch never checks id. That is the whole bug: for these components id
is the attribute that reaches the <input>.
input-id is not a prop on these components
NcTextField's published typings
(dist/components/NcTextField/NcTextField.vue.d.ts, nc-vue 9.9.0) declare
id, label, placeholder, inputClass, helperText, icon, modelValue,
onTrailingButtonClick, … and no inputId. grep -ril inputid across
dist/components/NcTextField/ and dist/components/NcInputField/ returns nothing.
So :input-id="x" on an NcTextField is not a prop — it falls through $attrs
onto the <input> as a literal input-id="x" attribute, which no browser or AT
consumes. The docblock's own example is therefore not implementable as written on
this component family:
<label :for="filePathId">File path or glob</label>
<NcTextField :input-id="filePathId" ... /> <!-- input-id is not a prop -->Why this cannot be closed honestly today
For each of the 11, the only ways to satisfy the gate are:
- add a bogus
input-id— a no-op attribute that documents nothing; or - add an
aria-label— which overrides the visible<label>, breaking
WCAG 2.2 AA SC 2.5.3 Label in Name and speech-input users who say what they
see. That is the exact regression this gate was rewritten to stop causing
(see theNcCheckboxRadioSwitchdefault-slot case in the module docstring).
A gate whose only remediation is an accessibility regression cannot be closed
honestly, so these are being left red and named in
ConductionNL/openregister#2405 rather than papered over.
Suggested fix
Extend the Nc* branch to accept a plain id that matches a <label for>, exactly
as the native branch already does — keeping input-id for the component families
where it is a real prop:
if name in NC_PROP_COMPONENTS:
for attr in ('input-id', 'id'):
v = _attr(attrs, attr)
if v and _norm_expr(v) in label_for:
return TrueThis is anchored to a real naming mechanism the browser implements (the same one
the native branch is anchored to), so it does not weaken the gate: an NcTextField
with no label prop, no aria-*, and no matching <label for> still fails.
Please pair it with a true-positive fixture so the relaxation cannot swallow the
case it must keep catching — an NcTextField id="x" where no <label for="x">
exists must still be reported.
Measurement
Method: run the checker, then for every remaining finding resolve the flagged id
against that file's own <label for=…> set. Package
651e5c5bb3ba8764903e5d6fc5bac5a208bd67fc, full repo, 211 markup files matched,
0-byte stderr on every run.
openregister's 11, all verified LABEL-FOR-OK:
| file | id |
|---|---|
src/views/settings/sections/FileConfiguration.vue |
dolphin-endpoint, dolphin-key, presidio-endpoint, openanonymiser-endpoint |
src/views/schema/CalendarProviderTab.vue |
cal-displayName, cal-title |
src/views/settings/sections/N8nConfiguration.vue |
n8n-url, n8n-project |
src/views/settings/sections/ApiTokenConfiguration.vue |
gitlab-url |
src/modals/object/CopyObject.vue |
copyName |
src/modals/object/MassCopyObjects.vue |
customPattern |
Six components, one repo. Any fleet repo using nc-vue text fields with an external
<label for> will show the same shape.
Correction to the hidden-file-input count, and scope of #273
While triaging the same 76 findings I also measured the hidden-file-input family
that #273 covers. In openregister it is 3, not 2:
| file | element |
|---|---|
src/views/account/sections/AvatarSection.vue |
<input ref="fileInput" type="file" accept="image/…" style="display: none"> |
src/modals/configuration/ImportConfiguration.vue |
<input id="configFileInput" ref="fileInput" type="file" accept=".json,…" style="display: none;"> |
src/modals/register/ImportRegister.vue |
<input ref="fileInput" type="file" accept=".json,.xlsx,…" style="display: none"> |
This narrows what #273 actually covers. #273 is written around
aria-hidden="true" tabindex="-1", but the openregister instances use
style="display: none" — a different spelling of the same fact: the element is
out of the accessibility tree, so a label associates nothing and aria-hidden
never appears. A fix keyed to the aria-hidden/tabindex spelling would miss all
three. The exemption should be keyed to "not in the accessibility tree"
(display:none, hidden, aria-hidden="true"), not to one spelling of it.
These three are the element gate-37's repair declared canonical, so they are also
left red rather than waived.
Not affected
The other gate-40 shapes in openregister were genuinely broken and are fixed in
#2405 (76 → 14): bare NcCheckboxRadioSwitch with no slot and no prop, <label>
elements with no for, and placeholder-only fields. This report is only about the
id-vs-input-id blind spot and the #273 spelling.
Activity
rubenvdlinde commentedon Aug 10, 2026
Fixed exactly as proposed, and the evidence is stronger than the issue states — 8.39.0 reads the consumer's
idout of$attrsdeliberately.Confirmed both claims against the published typings, which are the authority:
nc-vue 9.9.0 (openregister's pin) —
grep -ril inputid dist/components/NcTextField/ dist/components/NcInputField/→ no matches;NcTextField.vue.d.tsdeclaresid,label,placeholder,inputClass,helperText,modelValueand noinputId;NcInputField-5Sg6EUP6.mjsrendersid: __props.idonto the<input>.nc-vue 8.39.0 — zero occurrences of
inputIdinNcTextField, andNcInputFieldisinheritAttrs: falsewith:i.e. a consumer-supplied
idis deliberately read out of$attrsand used as the input's id, with a generated one only as fallback. Soidreaching the<input>is not an accident of attribute fall-through on either major line — it is the documented mechanism on both.input-idis kept, because it is a real prop onNcSelect/NcActionInput/NcSelectUsers/NcFormBoxSwitch(verified in the same dist), so the branch stays correct if one of those is ever added toNC_PROP_COMPONENTS.Measured, full-tree, 21 repos
openregister 76 → 65 — exactly the 11 reported here. Fleet 549 → 471 for this change alone (pipelinq −32, procest −35); 549 → 462 including the #273 fix in the same PR.
Verification
6 new arms. FP: literal
id+<label for>, and bound:id="`f-${uid}`"+:for→ 0. TP, and the abuse control: anidthat no<label for>points at → still 1 (otherwise the acceptance degrades to "has an id at all", andidis on nearly every control in the fleet — that would be a blanket, not a narrowing);idwith no label anywhere → 1; a dangling<label for>beside an unnamed field → 1; a bare<NcTextField>→ 1.Both FP arms fail on
origin/main; all 44 pass with the fix.Fixed in #329.
fix(gates): eight false-positive defects across gates 3/6/7/26/29/40/…