Skip to content

[3.0] Give these captions to the fields they belong to - #9558

Open
albertlast wants to merge 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/label-form-captions
Open

[3.0] Give these captions to the fields they belong to#9558
albertlast wants to merge 1 commit into
SimpleMachines:release-3.0from
albertlast:3.0/label-form-captions

Conversation

@albertlast

Copy link
Copy Markdown
Collaborator

Description

Nine form controls carry a caption that is drawn beside them and never associated with them. A screen reader announces the field with no name, and clicking the caption does nothing.

The theme already does this correctly elsewhere, which is what makes these read as oversights rather than a decision:

  • the same subject caption is a label bound to its input in the posting form and the newsletter form, and a bare <span> in the personal message and mailing forms;
  • the group form binds the "Required posts" caption on the page that edits a group, and leaves it unbound on the page that adds one.

Fixed the way the working ones already do it:

template fields
PersonalMessage To, Bcc, Subject
ManageMail Subject
Memberlist Search for — it had a <label> with no for at all
ManageMembergroups Required posts, on the add page
Reminder Username/Email — the form's only field
Profile Primary Membergroup, Signature

Where the input already had an id the label simply names it; where it did not, it gets one. No user-facing text is added or changed — every caption here is already on the page.

How they were found

By walking 484 controls over 43 pages and asking of each whether anything gives it an accessible name: a label[for], a wrapping label, aria-label, aria-labelledby, title or placeholder.

pages loaded:            43
controls checked:       484
caption present but unlinked:  26

These nine are the subset where that caption belongs to exactly one control and to nothing else.

Deliberately not touched
  • The ban form. Its captions are already labels, and they correctly name the checkbox that arms each trigger rather than the text field beside it. Pointing them at the text field instead would take the name off the checkbox.
  • Three places where one caption heads several controls — the search form's message-age range, the group form's permission selects, the avatar block. Those want a fieldset and legend, not a label.

Both need new wording, so they are their own change. The remaining 153 controls with no visible caption at all — the header search box among them — likewise need new translator-facing strings and are not in scope here.

Nothing moves

Computed colour, font, display and box geometry of every dt, dd and named control on the six affected pages, plus the height of each page, before and after:

stable records compared: 177
DIFFERENCES: 0

(The raw comparison first reported differences that were entirely SMF's per-request session-token field name and the autosuggest's dummy_NNNNNN inputs, which are random on every page load. Excluding those, the six pages are identical, page heights included.)

Part of wave 7 of the #7933 split, and a continuation of #9500 and #9549.

Issues References (Fixes|Related|Closes)

Related #9500

Nine form controls carry a caption that is drawn beside them and never
associated with them, so a screen reader announces the field with no name and
clicking the caption does nothing.

The theme already does this correctly elsewhere, which is what makes these look
like oversights rather than a decision. The very same subject caption is written
as a label bound to its input in the posting form and in the newsletter form,
and as a bare span in the personal message and mailing forms. The group form
binds the "required posts" caption on the page that edits a group and leaves it
unbound on the page that adds one.

Fixed the way the working ones already do it:

  PersonalMessage  To, Bcc, Subject
  ManageMail       Subject
  Memberlist       Search for - it had a <label> with no `for` at all
  ManageMembergroups  Required posts, on the add page
  Reminder         Username/Email, the form's only field
  Profile          Primary Membergroup, Signature

Where the input already had an id the label simply names it; where it did not,
it gets one. No user-facing text is added or changed: every caption here is
already on the page.

Found by walking 484 controls over 43 pages and asking of each whether anything
gives it an accessible name - a label, a wrapping label, aria-label,
aria-labelledby, title or placeholder. Twenty-six had a visible caption that was
simply not linked; these are the ones where that caption belongs to exactly one
control and to nothing else.

Deliberately not touched: the ban form, where the caption is a label already and
correctly names the checkbox that arms each trigger rather than the text field
beside it; and three places where one caption heads several controls, which want
a fieldset and legend rather than a label. Both need new wording, so they are
their own change.

Nothing moves. Computed colour, font, display and box geometry of every dt, dd
and named control on the six pages, plus the height of each page: 177 records,
no differences.

Signed-off-by: Mathias Alberts <mathiaspapealbert@hotmail.com>
Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
@github-actions github-actions Bot added the Theme label Aug 25, 2026
@albertlast albertlast mentioned this pull request Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant