Make WordPress Core

Opened 4 months ago

Last modified 7 days ago

#60062 assigned defect (bug)

Add required attribute to username and password field in wp_login_form function.

Reported by: alesflex's profile alesflex Owned by: rcreators's profile rcreators
Milestone: 6.6 Priority: normal
Severity: normal Version: 3.0
Component: Login and Registration Keywords: required-fields has-patch
Focuses: accessibility, template Cc:

Description

Add required attribute to username and password field in wp_login_form function.

Change History (7)

#1 @sabernhardt
4 months ago

  • Keywords required-fields added; changes-requested removed
  • Version trunk deleted

Related: #32510

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


5 weeks ago

#3 @joedolson
5 weeks ago

  • Keywords needs-patch added
  • Type changed from enhancement to defect (bug)
  • Version set to 3.0

There could be some side-effects to adding this for tools like social sign in, single sign on, etc., but it's worth exploring.

At a minimum, it should be possible to pass the required attribute to the function in the arguments array, even if they aren't added by default.

This will need some testing with extensions that include login mechanisms, particularly those that have any kind of custom bypass or handling.

#4 @joedolson
5 weeks ago

  • Milestone changed from Awaiting Review to 6.6

#5 @joedolson
5 weeks ago

  • Owner set to rcreators
  • Status changed from new to assigned

This ticket was mentioned in PR #6352 on WordPress/wordpress-develop by @rcreators.


13 days ago
#6

  • Keywords has-patch added; needs-patch removed

'required_username' and 'required_password' added to defaults. By default, both are set to false. So required attribute will not add to input fields. If set to true in $args for wp_login_form(), it will add the required attribute to the respective input field.

Trac ticket: https://core.trac.wordpress.org/ticket/60062

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


7 days ago

Note: See TracTickets for help on using tickets.