Srinath Posted July 8, 2012 Posted July 8, 2012 File Name: HideTitleAttributes.zipFile Submitter: SrinathFile Submitted: 07 Jul 2012File Category: Hooks and PluginsDescription: This hook hides title attributes from IP.Board front-end. This hook also works with all IP modules.Installation Steps: [*]Log-in into IP back-end (AdminCP) and click on “Manage Hooks” under “Applications & Modules” section. [*]Click on “Install Hook” button. [*]Select the .xml file that you extracted and click on “Install” button. That’s it. No further configuration is required. Background: When you mouse over any link in the front-end, it will display a tooltip. For example, if you mouse over on "Forums" link in the main navigation menu, it will display "Go to Forums" text. These title attributes continuous to appear all over the board. This hook simply hides those annoying tooltips. One of the things that annoyed me when I started customizing IPB is that it likes put a title attribute on just about every link it generates. There are several reasons I don’t like that: In most cases there is no option to disable the unwanted title attributes. Many of the title attributes simply repeat the link text, which is meaningless. [*]Extract the downloaded zip file.The default templates supplied by several Content Management Systems seem to duplicate the link text in navigational links into each link’s title attribute. I don’t know why they do this. It could be because the developers believe it will improve accessibility or that search engines like it. Either way, repeating link text in the title attribute doesn't do the end user any good. All it does is add repetitive noise and increase page size. It only makes sense to specify title text for links if the title text offers more or different information than the actual link text. Even in those cases, title text should be non-essential, since it will not be available to all users. Unless used with care, title attributes can be annoying or confusing to screen reader users. When screen readers encounter a link with a title attribute, they may read the title attribute instead of the link text, before the link text, after the link text, or not at all. It depends on which screen reader it is, how it is configured, and the content of the title text. Adding title attributes to every link does not improve accessibility – it can have a negative impact. On top of that, title text is unavailable to some users. So the title attribute should be used with care, not just routinely added to every link. Click here to download this file
Marcher Technologies Posted July 8, 2012 Posted July 8, 2012 .... this thing have a white-list? some of us factually use titles to display additional information, not repeat the text. additionally, are the title attributes on items that have no text(a around an img with an alt tag) left intact?
Marcher Technologies Posted July 9, 2012 Posted July 9, 2012 I should rephrase the above, I love the concept of nuking the cruft for those using screen-readers, I simply am not fond of those who can use title attributes being denied the additional information put there for a reason.... smart recognition a possibility maybe?
Srinath Posted July 9, 2012 Author Posted July 9, 2012 Interesting Question!This hook won't remove the title (and alt), instead just hides it!For example, lets consider the following code:<a href=" " title="Image"><img src=" " alt="Image" /></a>In the front-end, it renders both image title and alternative text. But it hides title attributes i.e., when you mouse over it it won't show the tooltip. By keeping the title and alt text tags it meets SEO!
Marcher Technologies Posted July 9, 2012 Posted July 9, 2012 >.< maybe i should explain better. when the title attribute is just non-truncated copy of the text, no great harm befalls the user experience for those able to use title attributes by it being removed. When, however, the title holds valuable information not presented in the text content, not meant to be accessed by screen-readers anyway, such becomes devastating... take social groups' page editor block titles as a simple example.
Srinath Posted July 9, 2012 Author Posted July 9, 2012 Well, "it" change from user to user. Personally I don't like seeing mouse over link text (title attributes) ... which gave birth to this hook...
Marcher Technologies Posted July 9, 2012 Posted July 9, 2012 :D I believe you just hit the nail on the head.... breaking one of my own golden rules here(and I quite profusely apologize for it)... but as it is a user's preference, site-wide seems overkill, no?
Srinath Posted July 9, 2012 Author Posted July 9, 2012 It depends on type of "screen readers" - If you use IE 10 on Windows 8, it shows tooltips in a way different than previous IE versions. Tooltips are not always necessary, but it depends on location. For example, In the primary navigation menu, when we mouse over "Forums" it shows "Go to Forums" - I don't think the user...
Marcher Technologies Posted July 9, 2012 Posted July 9, 2012 let me give a full ss of my concern ;) ^why I ask of either a white-list, or a pro-grammatical don't do that on this specific request option... most often where this would be an issue is not a publicly viewable page, but is a management level of some front-end item.
Srinath Posted July 9, 2012 Author Posted July 9, 2012 My hook won't touch new ipsBadge class introduced with last major version of IPB. That means you're code is fine! :smile: Check out the following code following the screenshot: <a href='http://www.domain.com/' data-tooltip="Get support for this file"><span class='ipsBadge ipsBadge_grey'>SUPPORT TOPIC</span></a>
Marcher Technologies Posted July 9, 2012 Posted July 9, 2012 My hook won't touch new ipsBadge class introduced with last major version of IPB. That means you're code is fine! :smile: Check out the following code following the screenshot: <a href='http://www.domain.com/' data-tooltip="Get support for this file"><span class='ipsBadge ipsBadge_grey'>SUPPORT TOPIC</span></a> is linux title attribute, not data-tooltip.. using a data-tooltip causes bugs in my 'drop'.... happily drops the tooltip html as well as the block.... good to know that though... suppose i will just code my way around the issue with that knowledge in hand :D thanks for the responses, quite helpful.
Srinath Posted July 9, 2012 Author Posted July 9, 2012 I'm inspired from famous Apple "www.apple.com" website. They completely avoided title attributes. Instead they occasionally uses CSS3 tooltips (http://jsfiddle.net/Bejrg/4/) in certain areas only. ipsBadge class already exists in IPB anyway!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.