Make WordPress Core

Opened 3 years ago

Closed 2 years ago

#38606 closed defect (bug) (wontfix)

Accessibility: required fields in login/register/password-reset forms

Reported by: ramiy Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Login and Registration Keywords: required-fields has-patch
Focuses: accessibility Cc:
PR Number:


In wp-login.php we have a login form, registration form and password reset form. All those forms have required fields. Let's make those fields more accessible with aria-required="true" attribute.

Related: [8853] and [36879]

Attachments (2)

38606.patch (3.8 KB) - added by ramiy 3 years ago.
38606.2.patch (3.7 KB) - added by ramiy 3 years ago.

Download all attachments as: .zip

Change History (10)

3 years ago

#1 @afercia
3 years ago

  • Keywords required-fields added
  • Milestone changed from Awaiting Review to Future Release

#2 @ramiy
3 years ago

  • Keywords has-patch added

#3 @Cheffheid
3 years ago

Out of curiosity, why aria-required and not the HTML5 required attribute? (Or both, if support is a concern, though with 4.8 dropping IE10 and older I think we should be safe).

I think I'd personally prefer using the required attribute because it comes with the benefits of aria-required and also has a client-side validation component. That is to say, a browser won't even submit the form if required fields are left empty.

And finally, I think the aim for this ticket is at least partially the same as #32510 - it may be worth consolidating the two (cc @afercia)?

#4 @afercia
3 years ago

Theoretically, required should be preferred over aria-required, because ARIA shouldn't be used when there's some native, equivalent, HTML feature. However the client-side validation triggered by required is largely inconsistent across browsers. This should be carefully evaluated.

3 years ago

#5 @ramiy
3 years ago

@Cheffheid @afercia, the second patch adds required attribute instead of aria-required.

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.

2 years ago

#7 @rianrietveld
2 years ago

Hey @ramiy,
Thanks for your work and patches.
We discussed this in the accessibility meeting in WordPress Slack.
Better leave this as it is. As we stick to the rule: The first rule of aria: don't use aria.
In this case it's so obvious that both fields are required, adding required or aria-required seems like overkill.

#8 @rianrietveld
2 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.