Make WordPress Core

Opened 7 years ago

Closed 3 months ago

Last modified 3 months ago

#38460 closed defect (bug) (fixed)

New user form on network site has non-required fields that have to be filled in

Reported by: jackreichert's profile jackreichert Owned by: audrasjb's profile audrasjb
Milestone: 6.2 Priority: normal
Severity: blocker Version:
Component: Networks and Sites Keywords: required-fields has-patch
Focuses: accessibility, multisite Cc:

Description (last modified by ocean90)

Similar to ticket #37331 In multi-site's New User form, there are several fields that are not required to submit the form (required and aria-required attributes are not set) but the form will fail server-side validation if these fields are not filled in.

Attachments (4)

38460.diff (1.9 KB) - added by jackreichert 7 years ago.
patch to fix ticket
38460-1.diff (1.7 KB) - added by jackreichert 7 years ago.
Per discussion on #37331, patch updated.
38460.2.diff (1.6 KB) - added by sabernhardt 7 months ago.
updated with new functions
Add-New-User-Network-Admin-with-patch.png (7.1 KB) - added by sabernhardt 7 months ago.
form with patch

Download all attachments as: .zip

Change History (22)

@jackreichert
7 years ago

patch to fix ticket

#1 @jackreichert
7 years ago

  • Keywords has-patch added

#2 @jackreichert
7 years ago

Since I was working on [37331] I thought I should take the liberty to fix this form as well.

#3 @ocean90
7 years ago

  • Description modified (diff)

@jackreichert
7 years ago

Per discussion on #37331, patch updated.

#4 @afercia
7 years ago

  • Keywords required-fields added

This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.


6 years ago

#6 @flixos90
6 years ago

@afercia We just looked at this again during our multisite ticket-scrub. Are there any updates yet from the a11y team on how to deal with required fields in the admin?

#7 @afercia
6 years ago

@flixos90 I'm afraid we haven't came to a conclusion about the best pattern to use for required fields.

#8 @sabernhardt
8 months ago

  • Focuses accessibility added
  • Keywords needs-refresh added
  • Milestone changed from Awaiting Review to 6.2

@sabernhardt
7 months ago

updated with new functions

#9 @sabernhardt
7 months ago

  • Keywords needs-refresh removed

#10 @audrasjb
5 months ago

  • Owner set to audrasjb
  • Status changed from new to reviewing

Self-assigning for review/test.

#11 @audrasjb
5 months ago

  • Keywords commit added

Thanks for the patch, it looks great to me 👍

#12 @audrasjb
5 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 55026:

Networks and Sites: Mark required fields as such in New User Form.

This changeset adds required="required" attributes to required form fields and uses wp_required_field_message() and wp_required_field_indicator() functions to improve the generated markup, and for better consistency with other required fields.

Props jackreichert, flixos90, afercia, sabernhardt.
Fixes #38460.

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


5 months ago

#14 @johnbillion
3 months ago

  • Keywords needs-patch added; has-patch commit removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

[55026] broke this form. The email input field now has the wrong id and name attributes, so attempting to create a new user from the Network Admin -> Users -> Add New screen results in the following error:

Usernames can only contain lowercase letters (a-z) and numbers.
Please enter a valid email address.

Discovered while testing #57164.

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


3 months ago
#15

  • Keywords has-patch added; needs-patch removed

#16 @johnbillion
3 months ago

  • Severity changed from normal to blocker

#17 @audrasjb
3 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 55394:

Networks and Sites: Fix the attributes for the email input field on the new network user screen.

This reverts the email input field back to its previous state (before [55026]), except for the expected addition of the required attribute.

Follow-up to [55026].

Props johnbillion.
Fixes #38460.

Note: See TracTickets for help on using tickets.