Skip to content

fix(a11y): 54 form controls had no accessible name — a placeholder is not a label - #160

Merged
rubenvdlinde merged 1 commit into
developmentfrom
fix/gate40-form-labels
Aug 9, 2026
Merged

rubenvdlinde merged 1 commit into
developmentfrom
fix/gate40-form-labels

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

gate-40 form-label-association: 54 → 0. Measured full-repo at gate package 48c88ba1e0d049f8f38538c33e790d3e603c55d0.

Adjudicated per item before anything was touched

gate-40 carries a known fleet-wide false-positive rate (~58%, .github#273, currently unclosable), so every one of the 54 was checked against the file rather than assumed. For each finding: does a real <label for> already point at this control? Does it already carry an aria-label?

The answer was no in all 54. Zero false positives in this repository.

That is not luck — it is a different population. The FP class elsewhere is inputs that are labelled and get flagged anyway. openbuild's 54 are bare <input>s whose only labelling is a placeholder:

<input :value="tab.id || ''" type="text" :placeholder="t('openbuild', 'Tab id')">

A placeholder is not an accessible name (WCAG 2.2 AA SC 1.3.1 / 3.3.2 — it disappears on the first keystroke and is not reliably announced).

Per-file: MenuTreeEditor 9 · SidebarTabBuilder 4 · SettingsSectionBuilder 4 · SearchPageEditor 4 · WidgetBuilder 3 · SidebarSectionBuilder 3 · FormFieldBuilder 3 · ActionBuilder 3 · SettingsPageEditor 3 · PageListEditor 2 · FormPageEditor 2 · DecisionTableEditor 2 · Step3Custom 2 · and 10 files with one each.

Two shapes of fix, chosen per site

Real <label for> where the file already has that convention. Step1Basics has <label for> for name and description; the slug input under Advanced had none. It now gets the same visible label its neighbours have, not an ARIA patch — real association beats ARIA when the markup allows it.

aria-label for narrow cells in repeated builder rows, carrying the same string the placeholder shows. Screen-reader users get exactly the name sighted users already get.

Reusing the existing t('openbuild', …) call means 52 of the 54 needed no new source string at all — no translation churn. The two exceptions are DecisionTableEditor's cells, which take the column name (col.naam) so each announces its own column, and its decision cell, which reuses the <th>'s own "Decision" string.

One new source string

"Raw page configuration (JSON)" for StubPageEditor's textarea — the only control with no placeholder, no legend and no heading of its own to borrow. Registered in both l10n/en.json and l10n/nl.json.

Verification

check result
node tests/l10n/check-l10n.js OK — every used key present
eslint on all 24 changed .vue files clean
gate-40 54 → 0
full gate suite gate-40 gone, no other gate gained a finding

Nothing was excluded, waived, or baselined.

… not a label

gate-40 form-label-association: 54 -> 0, measured full-repo at gate package
48c88ba.

ADJUDICATED PER ITEM FIRST. gate-40 carries a known fleet-wide false-positive
rate (~58%, .github#273), so every finding was checked against the file rather
than assumed: does a real `<label for>` already point at this control, or does
it already carry an aria-label? For openbuild the answer was NO in all 54 —
zero false positives here. The FP class elsewhere is inputs that ARE labelled
and get flagged anyway; openbuild's are bare `<input>`s whose only labelling is
a `placeholder`, which is not an accessible name (WCAG 2.2 AA SC 1.3.1 / 3.3.2
— a placeholder disappears on first keystroke and is not reliably announced).

Two shapes of fix:

  * Where a visible label already exists for sibling fields, add a real one.
    Step1Basics had `<label for>` for name and description but the slug input
    under "Advanced" had none — it now has the same visible label its
    neighbours have, not an ARIA patch.

  * Where the control is a narrow cell in a repeated builder row and a visible
    label would break the layout, `aria-label` carrying THE SAME string the
    placeholder shows. Screen-reader users get exactly the name sighted users
    already get. Reusing the existing `t('openbuild', …)` string means this
    introduces no translation churn: 52 of the 54 needed no new source string
    at all.

    The two exceptions: DecisionTableEditor's condition cells take the column
    name (`col.naam`) so each cell announces its own column; its decision cell
    reuses the `<th>`'s own "Decision" string.

One genuinely new source string, "Raw page configuration (JSON)", for
StubPageEditor's textarea — it had no placeholder, no legend and no heading of
its own to borrow. Registered in l10n/en.json AND l10n/nl.json.

Verified: `node tests/l10n/check-l10n.js` OK; eslint clean on all 24 changed
files; full gate suite shows gate-40 gone and NO other gate gained a finding.
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openbuild @ 78f7f29

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
test-l10n ✅
check-gitignore ✅
composer ✅ ✅ 101/101
npm ✅ ✅ 654/654
PHPUnit ✅
Newman ⏭️
Playwright ❌
Hydra gates ✅

Quality workflow — 2026-08-09 15:51 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit f1f1b47 into development Aug 9, 2026
30 of 32 checks passed
@rubenvdlinde
rubenvdlinde deleted the fix/gate40-form-labels branch August 14, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants