User profile edit: no label on second password field
|Reported by:||PhilippeVay||Owned by:||ocean90|
When editing a User profile in admin, there are 2 fields for password, the second one asking to "Type your new password again".
This second field has neither a label element nor a title attribute associated to it.
The first field has a label, the one in the th element: "New Password", correctly associated to the input via its for attribute (e.g. for="pass1" when the input field has an id="pass1").
Any form field should have an associated label (or at least a title) per WCAG 2.0, see the Technique H44: Using label elements to associate text labels with form controls. This helps screenreader and other assistive technologies users to understand without a doubt what is the role of each form field, improving the accessibility of the admin and thus ATAG and WCAG compliance of WordPress).
A simple solution would be to use the existing hint "Type your new password again." (right after the second password field) as its associated label.
span.description thus becomes:
<label class="description"><?php _e("Type your new password again."); ?></label>
This new label isn't styled in italic anymore (because the applied selector is span.description) so, in wp-admin/css/wp-admin.dev.css, one should also add label.description to the existing selector rule and to the one at the end of the same CSS file that removes italic for zh_CN localization.
Related ticket: #9445 (All Input Tags are not Section 508 Compliance)
Change History (18)
comment:6 in reply to: ↑ 5 SergeyBiryukov — 14 months ago
- Milestone changed from Awaiting Review to 3.6