Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#37650 closed enhancement (wontfix)

Title attribute for comment reply link

Reported by: trepmal's profile trepmal Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6
Component: Comments Keywords: has-patch
Focuses: accessibility Cc:


In the link created by get_comment_reply_link() there's no title attribute. I was trying to use an arrow icon, and wanted to add a tooltip for the user. Currently the only way to do this is to use the comment_reply_link filter and alter the HTML markup - not terribly elegant.
While aria-label is fantastic for assistive devices, I think title would be a nice addition for simple hints.

Attached patch adds reply_title and login_title arguments which default to empty, since the default link text is self-explanatory and a tooltip would be unnecessary. Naturally, open to feedback and alternatives.

Empty title attributes do not result in empty tooltips in the browsers I have readily available (OSX Firefox/Chrome/Safari) - I somewhat recall older versions of IE being an issue, but I don't have a definitive list of browser behaviors here.

Attachments (1)

37650.diff (4.7 KB) - added by trepmal 8 years ago.

Download all attachments as: .zip

Change History (5)

8 years ago

#1 @SergeyBiryukov
8 years ago

  • Focuses accessibility added

#2 @ocean90
8 years ago

  • Keywords has-patch added
  • Type changed from defect (bug) to enhancement

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

8 years ago

#4 @joedolson
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Hi, @trepmal! Thanks for contributing to WordPress!

The WordPress philosophy has been not to add any additional title attributes, due to their negative impact on accessibility. We discussed this ticket in the weekly bug scrub for accessibility, and have decided this is not something we'll add. There are many other ways to incorporate title attributes, if you wish to, or you can choose a more accessible route by creating accessible tooltips that aren't dependent on a mouse to access.

Here are a couple resources to help with that:

Thank you!

Note: See TracTickets for help on using tickets.