[3.0] Give these captions to the fields they belong to - #9558
Open
albertlast wants to merge 1 commit into
Open
Conversation
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>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
<span>in the personal message and mailing forms;Fixed the way the working ones already do it:
PersonalMessageManageMailMemberlist<label>with noforat allManageMembergroupsReminderProfileWhere 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,titleorplaceholder.These nine are the subset where that caption belongs to exactly one control and to nothing else.
Deliberately not touched
fieldsetandlegend, 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,ddand named control on the six affected pages, plus the height of each page, before and after:(The raw comparison first reported differences that were entirely SMF's per-request session-token field name and the autosuggest's
dummy_NNNNNNinputs, 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