WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 5 months ago

#32510 new enhancement

Add HTML5 "required" attributes to the login form

Reported by: aznadesign Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 2.1
Component: Login and Registration Keywords: has-patch needs-refresh required-fields
Focuses: ui, accessibility Cc:

Description

Hi evety one,
Today i try to login to WordPress dashboard and i knowed if i don`t write any thing in the input of username or password and then show message login error, I think if we add html5 tag "required" to the inputs of forms to validate the input labels not empty it is better for server and WordPress.
An also add feature to allow users and admins login by emails and add "type="email" required for login form.
And add feature to allow users to change admin dashboard design, like virtual menu, insert of customized code e.g #cd2122 by users
At end add stat menu to admin panel and show how many times WordPress up-time proudly, how many users, comments, plugins, alexa rank and etc
An also add Better WordPress menu that has 2 sub menu, one for security of WordPress like plugins and 2nd Performance and speed of site e.g minifity css and js and etc
Also add menu to seo features of core WordPress like add social icons to bottom of posts to allow visitor to share posts or add https://developers.google.com/structured-data/testing-tool/ codes to seo WordPress Sites.
This feature available by the plugins but if in core WordPress is better and faster and structure of WordPress is better.
Best regards,
Milad Shahi

Attachments (1)

html5-inputs-login.32510.diff (7.4 KB) - added by sanchothefat 17 months ago.
Adds required attributes to the login / register / forgot pass form fields as well as autofocus on first form field in each case

Download all attachments as: .zip

Change History (11)

#1 @wonderboymusic
20 months ago

  • Keywords needs-patch added
  • Type changed from feature request to enhancement
  • Version changed from 4.2.2 to 2.1

#2 @swissspidy
19 months ago

  • Component changed from General to Login and Registration
  • Focuses accessibility added; administration performance removed

The first two points are the ones relevant here:

  • Add required attributes to required input fields, like in the login form
  • Use input type email for the username login field (although emails aren't allowed by default)

@sanchothefat
17 months ago

Adds required attributes to the login / register / forgot pass form fields as well as autofocus on first form field in each case

#3 @sanchothefat
17 months ago

  • Keywords has-patch added; needs-patch removed

#4 @afercia
16 months ago

  • Keywords needs-refresh added

The required attribute is a boolean attribute, doesn't need a value.
http://www.w3.org/TR/html5/forms.html#the-required-attribute

Autofocus too is a boolean attribute
http://www.w3.org/TR/html5/forms.html#autofocusing-a-form-control:-the-autofocus-attribute
but it should be used carefully, and generally avoided. If really, really, necessary then it should be disabled for mobile devices.

See for example the discussion on autofocus on #29102.

This ticket was mentioned in Slack in #core-customize by celloexpressions. View the logs.


12 months ago

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


11 months ago

#7 @afercia
11 months ago

  • Milestone changed from Awaiting Review to Future Release
  • Summary changed from Add HTML5 Tags to WordPress to Add HTML5 "required" attributes to the login form

Adding required to the input fields has some value, it would at least avoid to submit the form with empty fields. Something worth considering. The username field now accepts also emails so not sure what can be done here about the type attribute.

As per the other points, please do feel free to open separate tickets if still relevant. Mixing together several issues in one single ticket makes things pretty unmanageable.

#8 @swissspidy
11 months ago

The username field now accepts also emails so not sure what can be done here about the type attribute.

I think now it makes even more sense because it will change the keyboard on mobile devices accordingly.

#9 @afercia
6 months ago

  • Keywords required-fields added

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


5 months ago

Note: See TracTickets for help on using tickets.