WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#33770 closed defect (bug) (fixed)

Comments: duplicated "author" ID and Quick Edit form

Reported by: afercia Owned by: afercia
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.3
Component: Comments Keywords: has-patch
Focuses: ui, accessibility Cc:

Description

In the Comments screen both a table column and a form field have an ID with value "author". This prevents the label associated to the form field to correctly work. To reproduce:

  • go in the Comments screen
  • "Quick Edit" a comment, a form will appear
  • click on the "Name" label (see screenshot below)

https://cldup.com/-M-0ggcT2G.png

When clicking the label, focus should be moved to the form field.

Attachments (2)

33770.patch (714 bytes) - added by afercia 5 years ago.
33770.2.patch (1.1 KB) - added by afercia 5 years ago.

Download all attachments as: .zip

Change History (9)

@afercia
5 years ago

#1 @afercia
5 years ago

  • Keywords has-patch added

Fix duplicated IDs in the Comments screen.

The proposed patch changes the label for attribute and the field ID from "author" to "author-name".

Last edited 5 years ago by afercia (previous) (diff)

#2 @afercia
5 years ago

  • Milestone changed from Awaiting Review to 4.4
  • Owner set to afercia
  • Status changed from new to assigned

#3 @rachelbaker
5 years ago

Good catch.

#4 @wonderboymusic
5 years ago

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

In 34070:

Quick Edit: fix an ID attribute name collision by renaming one of the author fields author-name.

Props afercia.
Fixes #33770.

#5 @ocean90
5 years ago

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

trunk/src/wp-admin/js/edit-comments.js needs to be updated as well.

@afercia
5 years ago

#6 @afercia
5 years ago

  • Keywords has-patch added; needs-patch removed

New patch to update the jQuery ID selectors in /wp-admin/js/edit-comments.js​. Thanks @ocean90. Sorry, missed that.

#7 @wonderboymusic
5 years ago

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

In 34159:

After [34070], account for the new ID in Quick Edit JS.

Props afercia.
Fixes #33770.

Note: See TracTickets for help on using tickets.