#47122 closed defect (bug) (fixed)
Media views: fix unlabelled controls
Reported by: | afercia | Owned by: | afercia |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | has-screenshots has-dev-note |
Focuses: | ui, accessibility, javascript | Cc: |
Description
In the various media views, there are various form controls that are unlabelled. That is, either they don't have any associated <label>
element, aria-label
attribute, etc. or they have an empty label.
Properly labelling form controls is essential for a basic level of accessibility, as labels give form controls their accessible name. The name is then used by assistive technologies to inform users "what" the form control is about.
Not to mention visible <label>
elements are clickable and help users with motor impairments to set focus on the associated form control.
A few examples:
The "Insert form URL" input field is wrapped in a <label>
that doesn't contain any text:
Worth noting the WordPress accessibility coding standards recommend explicitly associated labels (with for/id) attributes instead of implicitly (wrapping) labels.
The "Link To" select and input field miss an associated label: the visible text "Link To" is just text within a <span>
element:
Same when "custom url" is selected and the input field becomes editable:
I'd like to strongly recommend to make a complete audit of the form controls in the media views and address all the occurrences of unlabelled form controls.
Change History (11)
#1
@
5 years ago
- Milestone changed from Awaiting Review to 5.3
- Owner set to afercia
- Status changed from new to assigned
#4
@
5 years ago
- Keywords fixed-major added
- Milestone changed from 5.3 to 5.2.3
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening this so it can be back-ported to the 5.2 branch.
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
5 years ago
#7
@
5 years ago
- Keywords needs-dev-note added
- Milestone changed from 5.2.3 to 5.3
Several folks in core slack have commented with concern on pulling this into 5.2.3, so I'm going to go ahead and move this back to 5.3 so it can have proper testing and developer notice (thus adding needs-dev-note
) before being included in a release.
#8
@
5 years ago
- Keywords fixed-major removed
- Resolution set to fixed
- Status changed from reopened to closed
Re-closing, as the fix was already committed in [45499].
Keeping the needs-dev-note
tag on.
Related: #47141.