Make WordPress Core

Opened 12 years ago

Closed 10 years ago

#22183 closed enhancement (fixed)

Input type="email" and type="url"

Reported by: johnbillion's profile johnbillion Owned by: johnbillion's profile johnbillion
Milestone: 4.0 Priority: normal
Severity: normal Version:
Component: Administration Keywords: commit
Focuses: Cc:

Description

Text inputs for email addresses were replaced with email inputs in [20168] but reverted in [20196] due to poor client-side validation by Chrome 17 and Firefox 10, however we've had input type="email" on the registration form since [18763].

We should:

  1. Test the current state of client-side validation.
  2. Either introduce email inputs in the admin area or revert [18763] depending on the results of point 1.

See http://core.trac.wordpress.org/ticket/17863#comment:25 for the email input validation issue.

Attachments (3)

22183.diff (666 bytes) - added by lessbloat 12 years ago.
Changes email to text on wp-login.php (in case we don't go with the novalidate route)
22183b.diff (6.6 KB) - added by lessbloat 12 years ago.
novalidate option using email instead of text (needs testing)
22183.2.diff (15.0 KB) - added by Kau-Boy 10 years ago.
using type email/url and adding novalidate to all core forms

Download all attachments as: .zip

Change History (14)

#1 @toscho
12 years ago

  • Cc info@… added

#2 @nacin
12 years ago

  • Milestone changed from Awaiting Review to 3.5

I went through all of wp-admin. That wp-login.php was not reverted was indeed a mistake.

Setting the forms to novalidate should be sufficient, if that remains a concern. Context-sensitive mobile keyboards is, in my opinion, more important than validation.

@lessbloat
12 years ago

Changes email to text on wp-login.php (in case we don't go with the novalidate route)

@lessbloat
12 years ago

novalidate option using email instead of text (needs testing)

#3 @helenyhou
12 years ago

  • Keywords has-patch added

#4 @nacin
12 years ago

In 22413:

Revert type="email" on the registration form to avoid validation issues. see #22183.

#5 @nacin
12 years ago

  • Milestone changed from 3.5 to Future Release

Let's try to bring these back (sans validation) in a future release.

#6 @Kau-Boy
10 years ago

  • Summary changed from Input type="email" to Input type="email" and type="url"

I've wrote a new patch with the current dev version. The patch will fix not only type="email" but also type="url" where ever it should be used for usabilty reasons.

It also adds the novalide="novalidate" in XHTML syntax to all <form> tags concidering the mentioned validation issue in FF.

This patch is proudly presented by the WordCamp Hamburg Contributor Day. #wchh14

@Kau-Boy
10 years ago

using type email/url and adding novalidate to all core forms

#7 @wonderboymusic
10 years ago

  • Milestone changed from Future Release to 4.0

Someone should decide if we want this

#8 @johnbillion
10 years ago

  • Keywords needs-testing added

This needs some good cross-browser testing with IDNs. I'll see what I can do.

#9 @johnbillion
10 years ago

  • Keywords commit added; has-patch needs-testing removed

Looks like we're good to go. The novalidate attribute allows the form to be submitted in the following browsers which otherwise reject valid IDNs:

  • Chrome 28 and earlier (desktop and Android)
  • Firefox 12 and earlier
  • IE10 & IE11

For completeness:

  • Safari (desktop and iOS) does not perform any validation
  • Android browser does not perform any validation
  • Opera (tested up to 22) correctly handles IDN validation

Tested using BrowserStack with the following URL: https://johnblackbourn.com/idn.php

This ticket was mentioned in IRC in #wordpress-dev by helen. View the logs.


10 years ago

#11 @johnbillion
10 years ago

  • Owner set to johnbillion
  • Resolution set to fixed
  • Status changed from new to closed

In 29030:

Implement email and url input types where appropriate. Props Kau-Boy. Fixes #22183.

Note: See TracTickets for help on using tickets.