Make WordPress Core

Opened 8 years ago

Closed 5 years ago

#36854 closed enhancement (wontfix)

Fix for comment reply button focus on button elements in js

Reported by: marcdk's profile MarcDK Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: Comments Keywords:
Focuses: javascript Cc:

Description

Some users use themes or plugins which put button form elements before the textarea element in the comment form. The comment-reply.js assumes that there are no button elements. I added a check if the element type is "button". In that case the selection is skipped which results in the correct behaviour: the focus is set on the textarea element. Not on buttons like "bold", "italic" and so on.

I included a minified version of the comment-reply.js file. I did not know if this was necessary.

Attachments (1)

fix_button_focus_on_reply.patch (3.5 KB) - added by MarcDK 8 years ago.

Download all attachments as: .zip

Change History (2)

#1 @earnjam
5 years ago

  • Resolution set to wontfix
  • Status changed from new to closed
  • Version changed from 4.6 to 4.4

Hi @MarcDK, I apologize for how long it took to get a response to this ticket.

I believe this was done by design in #29974. This is because for accessibility reasons, we always want to move the focus to the first form element, regardless of type. It allows users to then progress ahead as needed, but not have missed anything that could be important.

Based off the discussion and decisions made in the previous ticket, I'm going to close this as wontfix.

Note: See TracTickets for help on using tickets.