Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#48657 closed enhancement (fixed)

wp-signup page lacks a role="main"

Reported by: steelwagstaff's profile SteelWagstaff Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: normal Version: 5.3
Component: Login and Registration Keywords: has-patch
Focuses: accessibility, multisite Cc:

Description

The wp-signup.php page lacks a role="main" landmark. According to w3c guidelines, each webpage should have one main landmark, designated by the role="main" attribute. See https://www.w3.org/TR/wai-aria-practices/examples/landmarks/main.html. It seems to me that the existing container div <div class="mu_register wp-signup-container"> https://core.trac.wordpress.org/browser/trunk/src/wp-signup.php#L89 would be a good candidate to receive the role="main" designation in this case. Patch attached (this is my first time contributing, so happy to take instruction if any part of this could be improved).

Attachments (2)

wp-signup.diff (439 bytes) - added by SteelWagstaff 5 years ago.
Adds role="main" to existing container div on the wp-signup.php page
48657.diff (444 bytes) - added by audrasjb 5 years ago.
Login and Registration: Accessibility: Use main HTML role on Signup screen.

Download all attachments as: .zip

Change History (11)

@SteelWagstaff
5 years ago

Adds role="main" to existing container div on the wp-signup.php page

#1 @SergeyBiryukov
5 years ago

  • Component changed from General to Login and Registration
  • Focuses multisite added

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


5 years ago

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


5 years ago

#4 @SergeyBiryukov
5 years ago

  • Milestone changed from Awaiting Review to 5.4
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#5 @SteelWagstaff
5 years ago

For more context, we're adding a main role via javascript in our WP-based project currently: https://github.com/pressbooks/pressbooks/pull/1837 and would love to remove if this were done by WP core.

#6 follow-up: @audrasjb
5 years ago

  • Keywords needs-refresh has-patch added

Hi, welcome to WordPress Trac and thanks for this ticket,

Good catch!
FYI, I can't apply the patch since it wasn't generated against trunk (wordpress-develop repository).
Adding a new patch below

@audrasjb
5 years ago

Login and Registration: Accessibility: Use main HTML role on Signup screen.

#7 @audrasjb
5 years ago

  • Keywords needs-refresh removed

#8 in reply to: ↑ 6 @SteelWagstaff
5 years ago

Replying to audrasjb:

Hi, welcome to WordPress Trac and thanks for this ticket,

Good catch!
FYI, I can't apply the patch since it wasn't generated against trunk (wordpress-develop repository).
Adding a new patch below

Thank you, @audrasjb !

#9 @SergeyBiryukov
5 years ago

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

In 47075:

Accessibility: Login and Registration: Add a role="main" landmark to the container div in wp-signup.php.

Props SteelWagstaff, audrasjb.
Fixes #48657.

Note: See TracTickets for help on using tickets.