Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#39045 closed defect (bug) (fixed)

W3C Validator warning: Attribute aria-required is unnecessary for elements that have attribute required.

Reported by: henrywright's profile henry.wright Owned by: lakenh's profile lakenh
Milestone: 4.9.5 Priority: normal
Severity: normal Version:
Component: Comments Keywords: required-fields good-first-bug has-patch fixed-major
Focuses: accessibility Cc:

Description

File: wp-includes/comment-template.php

Screenshot incoming.

Attachments (2)

Screenshot 2016-12-04 at 13.10.24.png (12.8 KB) - added by henry.wright 8 years ago.
39045.diff (2.7 KB) - added by lakenh 7 years ago.

Download all attachments as: .zip

Change History (20)

#1 @davidakennedy
8 years ago

  • Focuses accessibility added

Thanks @henry.wright for the ticket!

A few notes:

  • This is a warning, and not an error, so it's not an immediate problem.
  • I believe the form contains both because there was a time that having both meant a wider range of support for both browsers and assistive technology.
  • This is something the accessibility team needs to discuss to decide if it's the right time to remove one of these.

#2 @davidakennedy
8 years ago

  • Milestone changed from Awaiting Review to Future Release

#3 @afercia
8 years ago

  • Keywords required-fields added

#4 @afercia
8 years ago

  • Version 4.6.1 deleted

#5 @afercia
7 years ago

Yep there was a time when both were needed. Today, it's safe to use just required. Instead, aria-required is for custom, non-native, controls. Also, just stumbled upon a good feedback from Adrian Roselli:
https://stackoverflow.com/a/37975985

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


7 years ago

#7 @afercia
7 years ago

  • Keywords good-first-bug added
  • Milestone changed from Future Release to 5.0

#8 @afercia
7 years ago

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

@lakenh
7 years ago

#9 @lakenh
7 years ago

As discussed in the ticket and meetings, the aria-required attribute was removed from this template, leaving only required.

This patch only covers the particular file that this ticket is about; there very well could be other areas in WordPress that use both of these attributes.

#10 @SergeyBiryukov
7 years ago

  • Component changed from General to Comments

#11 @audrasjb
7 years ago

Hi and thanks for the patch @lakenh
Tested and looks good to me :)

The only other place I found both aria-required and required attributes is wp-admin/includes/media.php, but it will need a separated ticket.

Version 0, edited 7 years ago by audrasjb (next)

#12 @Dualcube
7 years ago

  • Keywords has-patch added

#13 @SergeyBiryukov
7 years ago

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

In 42758:

Comments: Remove unnecessary aria-required attribute from comment_form(), added with the function in [12810].

At the time, having both required and aria-required meant a wider range of support for browsers and assistive technology. Today, it's safe to use just required.

Props lakenh, afercia, davidakennedy, henry.wright.
Fixes #39045.

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


7 years ago

#15 @danieltj
7 years ago

  • Milestone changed from 5.0 to 4.9.5

As per today's bug scrub, moving this forward for inclusion in 4.9.5.

#16 @danieltj
7 years ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

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


7 years ago

#18 @ocean90
7 years ago

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

In 42849:

Comments: Remove unnecessary aria-required attribute from comment_form(), added with the function in [12810].

At the time, having both required and aria-required meant a wider range of support for browsers and assistive technology. Today, it's safe to use just required.

Merge of [42758] to the 4.9 branch.

Props lakenh, afercia, davidakennedy, henry.wright.
Fixes #39045.

Note: See TracTickets for help on using tickets.