Opened 7 years ago
Closed 7 years ago
#37650 closed enhancement (wontfix)
Title attribute for comment reply link
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.6 |
Component: | Comments | Keywords: | has-patch |
Focuses: | accessibility | Cc: |
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.
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!