Jump to content

Download: HideTitleAttributes.zip


Srinath

Recommended Posts

Posted

File Name: HideTitleAttributes.zip
File Submitter: Srinath
File Submitted: 07 Jul 2012
File Category: Hooks and Plugins

Description:
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
Posted

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?

Posted

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!

Posted

>.< 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.

Posted

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...

Posted

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...

Posted

let me give a full ss of my concern ;)
post-201612-0-99519000-1341796185_thumb.
^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.

Posted

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>



post-200408-0-43476900-1341797111.png

Posted

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>



post-200408-0-43476900-1341797111.png


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.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...