?
avatar cr2a-graphique
cr2a-graphique
15 Dec 2015

Can we have a différent 'title' than the content of the link (fix accessibility error) in email, print and edit :

For Email :

File :
joomla-cms/components/com_content/helpers/icon.php
Can we have a different Jtext for the title like : JGLOBAL_EMAIL_TITLE

For print:

File :
joomla-cms/components/com_content/helpers/icon.php
Can we have a different Jtext for the title like : JGLOBAL_PRINT_TITLE

For Edit:

File :
joomla-cms/components/com_content/helpers/icon.php
Can we have a different Jtext for the title like : JGLOBAL_EDIT_TITLE

Accessibility 'french' rule :

6.2.4

Pour chaque lien composite ayant un titre de lien (attribut title), le contenu de cet attribut est-il > pertinent ?

avatar cr2a-graphique cr2a-graphique - open - 15 Dec 2015
avatar brianteeman brianteeman - change - 16 Dec 2015
Labels Added: ?
avatar brianteeman
brianteeman - comment - 17 Dec 2015

I am sorry I do not understand what you are asking


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8694.

avatar infograf768
infograf768 - comment - 18 Dec 2015

I guess I do understand.
Basically, for accessibility reasons, @cr2a-graphique says that the text displayed for these buttons should be different from the title of the link.

I.e. $attribs['title'] = JText::_('JGLOBAL_EMAIL');
should use another string than $text = '<span class="icon-envelope"></span>' . JText::_('JGLOBAL_EMAIL');

For example, we have for email:
screen shot 2015-12-18 at 09 32 22

<li class="email-icon">
<a rel="nofollow" onclick="window.open(this.href,'win2','width=400,height=350,menubar=yes,resizable=yes'); return false;" title="E-mail" href="/trunkgitnew/component/mailto/?tmpl=component&template=protostar&link=e2ff909fd70c5e96eb1d6a5d32cf1770afd9852d">
<span class="icon-envelope"></span>
E-mail
</a>
</li>

Therefore he proposes we patch in order to get:

<li class="email-icon">
<a rel="nofollow" onclick="window.open(this.href,'win2','width=400,height=350,menubar=yes,resizable=yes'); return false;" title="JGLOBAL_EMAIL_TITLE" href="/trunkgitnew/component/mailto/?tmpl=component&template=protostar&link=ffa35a7825e020c5c730bbf9258ea430f5071995">
<span class="icon-envelope"></span>
Email
</a>
</li>

screen shot 2015-12-18 at 09 28 03

Where JGLOBAL_EMAIL_TITLE could be
JGLOBAL_EMAIL_TITLE="Email this link to a friend"

JGLOBAL_EDIT_TITLE="Edit article"

JGLOBAL_PRINT_TITLE="Print article"

Patch would be (btw we have to add a title for Edit as it is missing):

diff --git a/components/com_content/helpers/icon.php b/components/com_content/helpers/icon.php
index 421bc82..febfe38 100644
--- a/components/com_content/helpers/icon.php
+++ b/components/com_content/helpers/icon.php
@@ -108,5 +108,5 @@
        }

-       $attribs['title']   = JText::_('JGLOBAL_EMAIL');
+       $attribs['title']   = JText::_('JGLOBAL_EMAIL_TITLE');
        $attribs['onclick'] = "window.open(this.href,'win2','" . $status . "'); return false;";
        $attribs['rel']     = 'nofollow';
@@ -224,4 +224,5 @@
        }

+       $attribs['title']   = JText::_('JGLOBAL_EDIT_TITLE');
        $output = JHtml::_('link', JRoute::_($url), $text, $attribs);

@@ -267,5 +268,5 @@
        }

-       $attribs['title']   = JText::_('JGLOBAL_PRINT');
+       $attribs['title']   = JText::_('JGLOBAL_PRINT_TITLE');
        $attribs['onclick'] = "window.open(this.href,'win2','" . $status . "'); return false;";
        $attribs['rel']     = 'nofollow';

plus evidently the new language strings

I can make a PR but as I am not a specialist of accessibility, better wait for a comment here.

avatar brianteeman
brianteeman - comment - 18 Dec 2015

From an accessibility point of view using the title tag here is probably useless and not recommended http://webaim.org/articles/gonewild/#title


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8694.

avatar cr2a-graphique
cr2a-graphique - comment - 18 Dec 2015

hi,
Thanks to @infograf768 who understand me :+1:

In fact, using the title tag can be useless. But i think it's better to improved the title cause the term 'email' or 'print' don't explain what's realy hapen next.
A title like
title="print this article" are better
or
title="print the article : <name of article>" are much better

No title tag or title tag improved are valid. but, for sure title and link can't be the same term.
Can we do something ?

avatar brianteeman
brianteeman - comment - 9 Mar 2016

@infograf768 will you be able to do a PR for this ?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8694.

avatar brianteeman
brianteeman - comment - 9 Mar 2016

@infograf768 will you be able to do a PR for this ?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8694.

avatar cr2a-graphique
cr2a-graphique - comment - 10 Mar 2016

I gone try as soon as possible

avatar infograf768
infograf768 - comment - 10 Mar 2016

I will if you don't :)

avatar cr2a-graphique
cr2a-graphique - comment - 10 Mar 2016

yes, i don't realy know how, so if you can do this @infograf768 it's cool

avatar infograf768
infograf768 - comment - 11 Mar 2016

Please test #9372

avatar brianteeman brianteeman - change - 11 Mar 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-03-11 09:41:47
Closed_By brianteeman
avatar brianteeman
brianteeman - comment - 11 Mar 2016

Closed as we have a PR for testing - thanks


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8694.

avatar brianteeman brianteeman - close - 11 Mar 2016
avatar brianteeman brianteeman - close - 11 Mar 2016
avatar infograf768
infograf768 - comment - 11 Mar 2016

Closing as we have a patch


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8694.

Add a Comment

Login with GitHub to post a comment