Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#37650 closed enhancement (wontfix)

Title attribute for comment reply link

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

Description

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 10 years ago.

Download all attachments as: .zip

Change History (5)

@trepmal
10 years ago

#1 @SergeyBiryukov
10 years ago

  • Focuses accessibility added

#2 @ocean90
10 years ago

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

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


10 years ago

#4 @joedolson
10 years ago

  • Milestone Awaiting Review
  • Resolutionwontfix
  • Status newclosed

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:

https://www.nngroup.com/articles/icon-usability/
http://heydonworks.com/practical_aria_examples/#input-tooltip
http://accessibility.athena-ict.com/aria/examples/tooltip.shtml

Thank you!

Note: See TracTickets for help on using tickets.