Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 2:37 am (All times are UTC )

 




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: 508 Guide
Posted: Thu Feb 09, 2006 5:55 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Wed Aug 17, 2005 11:11 pm
Posts: 311
Is there a guide in English to what the 508 hack actually does to the site, regarding changes?

I installed it on a site, and for some reason it adds a . to the end of each list item, which is pretty annoying. Can someone tell me the reason for this, and if there is a guide available, as i want to change a few other hacks as well.?


Top
  E-mail  
 
 Post subject: Re: 508 Guide
Posted: Thu Feb 09, 2006 9:28 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Thu Aug 18, 2005 6:50 am
Posts: 294
Location: Germany - Aachen
Hi,

the . is for screenreaders. Some of them read links without a break.The point let them stop for a while and you (if you can't see the site) can keep apart the links.

you could use this css-code

Code:
.unsichtbar, .reader, a.skip
{
   display:none
}

/* iemac hide \*/

.unsichtbar, .reader, a.skip
{
        position: absolute;
        left: -3000px;
        top: -2000px;
        width: 0px;
        height: 0px;
        overflow: hidden;
        display: inline;
}

/* eof iemac hide */


The answer for the other question is no. We haven't a quide in english nor in an other language.

_________________
Best regards, Robert
--
My Blog: http://www.robert-deutz.de


Top
  E-mail  
 
 Post subject: Re: 508 Guide
Posted: Thu Feb 09, 2006 9:36 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Wed Aug 17, 2005 11:11 pm
Posts: 311
ok many thanks for that, i actually removed it from the code, but i like the CSS hack better.
Never thought of the screen reader issue, i was in 'getting it finished' mode.

One other thing I have noticed, is that the ability to give a menu item an image is still available but it doesnt show up in the parameters for the modules.

Whats the best way to add a menu image with the 508 hack, i have the css to control it, i just want it to show up first.

thnx


Top
  E-mail  
 
 Post subject: Re: 508 Guide
Posted: Fri Feb 10, 2006 8:08 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Thu Aug 18, 2005 6:50 am
Posts: 294
Location: Germany - Aachen
hotnuts21 wrote:
One other thing I have noticed, is that the ability to give a menu item an image is still available but it doesnt show up in the parameters for the modules.

Whats the best way to add a menu image with the 508 hack, i have the css to control it, i just want it to show up first.


I don't know what the main goal is to have a menu image, but I guess two ways are possible.

CSS: background-image for the ul or li tag
patTemplate change the file ./modules/tmpl/mod_mainmenu.html 

_________________
Best regards, Robert
--
My Blog: http://www.robert-deutz.de


Top
  E-mail  
 
 Post subject: Re: 508 Guide
Posted: Fri Feb 10, 2006 12:19 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Wed Aug 17, 2005 11:11 pm
Posts: 311
Yeah the CSS option is possible, but may require a little bit of custom code, as I want the images to be specifically related to the content.

I wonder why the images were removed from the menu modules, i may see if its possible to put those sections back.

Thanks for helping me brainstorm.

[Edit]
Thinking about this, if i hack the pattemplate file it will effect all menus, and I only want it to affect one. Grrrrr. I need to get a switch into it somehow.


Last edited by hotnuts21 on Fri Feb 10, 2006 1:21 pm, edited 1 time in total.

Top
  E-mail  
 
 Post subject: Re: 508 Guide
Posted: Fri Feb 10, 2006 3:43 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Thu Aug 18, 2005 6:50 am
Posts: 294
Location: Germany - Aachen
please send a link to your page and I will take a look what the best solution for your problem is (hmmm, is this correct grammer)

_________________
Best regards, Robert
--
My Blog: http://www.robert-deutz.de


Top
  E-mail  
 
 Post subject: Re: 508 Guide
Posted: Fri Feb 10, 2006 9:39 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Wed Aug 17, 2005 11:11 pm
Posts: 311
I had a play ;)

This is what I ended up doing.

First I created a parameter in the menu modules.
Open mod_mainmenu.xml and change this
Code:
<param name="expand_menu" type="radio" default="0" label="Expand Menu" description="Expand the menu and make its sub-menus items always visible">
<option value="0">No</option>
<option value="1">Yes</option>
</param>

to this
Quote:









Next I had to modify the template to show my image code, but only for the menu where image_menu was selected.

So I opened up ./modules/tmpl/mod_mainmenu.html  and changed
Code:
{ITEM_NAME}


to
Code:
<mos:tmpl type="simplecondition" requiredvars="IMAGES=1" varscope="item">
<img src="http://www.aainternational.co.uk/templates/temp/images/small-img{ITEM_ID}.jpg" class="smallimg-holder" alt="{ITEM_NAME}" width="29" height="25" /><h4>
</mos:tmpl>
{ITEM_NAME}   
<mos:tmpl type="simplecondition" requiredvars="IMAGES=1" varscope="item">
</h4>
</mos:tmpl>   

a Few things to note in here, firstly i had to hard code the images directory, because i dont know if its a 1.07 bug or a 508 bug or something else, but with SEO urls on it added the url to the end of whatever page it was on, which was a pain in the ar**. Secondly to get each image unique, it pulls the ITEM_ID. So i could then click on the link and see what the id was, and rename all the images to suit. Which is a lot easier than it sounds.

Lastly I had to make a change to the mod_mainmenu.class.php file.  change this
Code:
$tmpl->addVar( 'mod_mainmenu', 'CLASS', $params->get( 'class', '' ) );
$tmpl->addVar( 'mod_mainmenu', 'MODULECLASS', $params->get( 'moduleclass', '' ) );


to this

Code:
      
$tmpl->addVar( 'mod_mainmenu', 'CLASS', $params->get( 'class', '' ) );
$tmpl->addVar( 'mod_mainmenu', 'MODULECLASS', $params->get( 'moduleclass', '' ) );
$tmpl->addVar( 'mod_mainmenu', 'IMAGES', $params->get( 'image_menu', '' ) );


You will notice that the normal 508 code produces a normal list item, by doing the above it puts the image within that list item, this is acceptable but a lot of people might not like it. It products list items like this (i abbreviated it slightly to make it easier on the eyes)
Code:
<li><a href="/content/blogcategory/2/33/" title="Rural Situation Assessing"><img src="/images/small-img33.jpg" class="smallimg-holder" alt="Rural Situation Assessing" width="29" height="25" /><h4>Rural Situation Assessing</h4></a><span class="unsichtbar">.</span></li>


You can see it in action at http://www.aainternational.co.uk
Just a few minor things that need clearing up, like the lists on category pages and the print/pdf icons.

Also i notice none of the mosimage tags are replaced with images. Its getting to be that this 508 hack is more hassle than its worth, especially if you dont know whats it changed. I mean why no images showing up?

thnx
Paul


Last edited by hotnuts21 on Fri Feb 10, 2006 9:51 pm, edited 1 time in total.

Top
  E-mail  
 
 Post subject: Re: 508 Guide
Posted: Fri Feb 10, 2006 10:53 pm 
For what it's worth, adding a period at the end of a link in a LIST is completely unecessary.  Some older screen readers are not able to process contiguous links, however, the mere fact that they are in a list is sufficient to "break" it.

This technique is just adding extra weight to the page unecessarily.

If you had two adjacent links that were not within lists, then, yes, it becomes important.

However, even with that, some of the same screen reader that have a problem with adjacent links understand the display:none; css declaration, which means if you're using the period to separate the links, but using css to visually hide it, you may end up with screen readers going straight through it anyway.  So, either way you "look" at it, this technique is not appropriate and doesn't do what it's supposed to do, i.e. increase accessibility and usability.


Top
   
 
 Post subject: Re: 508 Guide
Posted: Sat Feb 11, 2006 11:35 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Wed Aug 17, 2005 11:11 pm
Posts: 311
Cool, i will remove it from the template then.


Top
  E-mail  
 
 Post subject: Re: 508 Guide
Posted: Sat Feb 11, 2006 12:43 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Thu Aug 18, 2005 6:50 am
Posts: 294
Location: Germany - Aachen
vavroom wrote:
For what it's worth, adding a period at the end of a link in a LIST is completely unecessary.


We have discussed this many times, I think it is useful. It is not mandatory to reach a consensus on about that, anyone can do it as he like. Change the patTemplate and all is fine.

vavroom wrote:
However, even with that, some of the same screen reader that have a problem with adjacent links understand the display:none; css declaration, which means if you're using the period to separate the links, but using css to visually hide it, you may end up with screen readers going straight through it anyway.


Normaly the dot have a position beside the viewpoint.

Code:
.unsichtbar, .reader, a.skip
{
        position: absolute;
        left: -3000px;
        top: -2000px;
        width: 0px;
        height: 0px;
        overflow: hidden;
        display: inline;
}

_________________
Best regards, Robert
--
My Blog: http://www.robert-deutz.de


Top
  E-mail  
 
 Post subject: Re: 508 Guide
Posted: Sat Feb 11, 2006 9:27 pm 
lukewill wrote:
We have discussed this many times, I think it is useful. It is not mandatory to reach a consensus on about that, anyone can do it as he like. Change the patTemplate and all is fine.


Yes, we have discussed this many times.  We'll have to agree to disagree, obviously.

I just hope it doesn't make it in whatever the U&A team is "cooking up" for accessibility.  It's extra code that just clutters the page.

But obviously, I've lost any right to argue the case since I resigned from the core...


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group