okay… here is the dilemma.
I have a client that has a top navi bar. The navi bar is made up of images [U]that have a very specific font style text on them[B]not
So, I could still do it in CSS and make the buttons backgrounds and just swap the background image, with its text on it. BUT, if I do this, I cannot have ALT tags or any html text in place if an issue or for search engines. Sure, I can cut out all the image preloading, ditch the scripts needed to run roll-overs, run the entire navi via CSS, I get a 5 button navi bar to run with just 5 images, and I use current CSS. Many benefits, but a key negative since no ALT tag or html text in this particular case.
Of course, I could also do this by good old js with the all those bulky additional image preload calls in the <body>, the scripts to run roll-overs, 10 buttons (an ‘on’ and ‘off’ state) for a 5 button navi, but I get to use ALT tags at least. But is that really reason enough to use it.
I feel like since the customer MUST have their font style used in the navi buttons, meaning the text and buttons are 1, I loose part of the benefit of a css navi.. that is, I could have HTML text in the page AND just 1 generic background image can be the on and off state – which is a real beauty of css navi, but not in this case. And, with css navi, I get no ALT tags in this case and since this navi must use buttons with their font style text on them, there is no text to see if an issue arises (since no ALT tag and no HTML text) or for search engines as the entire thing is image based. BUT, you also want to use more current technology like CSS, cut out the preloads, cut out the scripting to run roll-overs, use 5 images rather than 10..
do you see the dilemma?? not sure what best to do??
<i>
</i><ul>
<li><a href="file.htm"><span>Actual Text</span></a></li>
</ul>
I do basically the same thing, but I set the display to none rather than the font size to 0.[/QUOTE]
Actually...
Mine looks like this for example
<td class="hrollover"><a href="file.htm"></a></td>
"hrollover" then defines the size of cell, roll-over effect, etc.. could I also do what you do and add a class into it like this
<td class="hrollover"><a href="file.htm">[B]<span class="xyz">Actual Text</span>[/B]</a></td>
and then define my xyz class to be display none or tetx size 0 and essentially do exactly what you have done[/QUOTE]
I used to do that, too, until I downloaded NVDA and it wouldn't recognize anything with "display: none". WebAIM said that some screen readers actually heed display settings; anyway, that's why I use the font-size method. It may be just some quirk of NVDA.[/QUOTE]
Yes. I'm currently working on a website that must meet all three ADA priorities, but use the strict branding of the client. What I came up with was to apply the images as backgrounds to the <li><a>, but then within the <a> insert a <span> that has the font-size set to 0px. The screen reader will still "view" it, but the sighted visitor will not see it. I do use javascript to render the dropdown (for IE6) only, however the javascript only changes the CSS; the code is already in the document.
<i>
</i><ul>
<li><a href="file.htm"><span>Actual Text</span></a></li>
</ul>
Here's an example:[url="http://apps.cpe.ky.gov/temp_docs/prototypes/kh2gky/index.shtm"]link[/url] [/QUOTE]
#navigation span {display:none}
#nav-welcome a:link, #nav-welcome a:visited {
background:url(/welcome.jpg) no-repeat bottom;
}
#nav-welcome a:hover, #nav-welcome a:active {
background:url(/welcome.jpg) no-repeat top;
}
<link href="/style-screen.2008-01-27.css" media="screen" rel="stylesheet" type="text/css">
<li id="nav-welcome"><a href="/"><span>Welcome</span></a></li>
the text between <span>Welcome</span> is not seen by screen readers (nor by search engines either then)
[/quote]
BUT from my quick test... no go as we are still back where we were as you are still setting navigation span {display:none} and thus the text between <span>Welcome</span> is not seen by screen readers (nor by search engines either then).[/QUOTE]You're still doing it wrong and you're still operating under a false assumption. Unless you are using a faulty one, your screen reader will not observe styles directed at the screen. And search engines don't pay attention to the styles at all.
Really? I thought, (and could be completely wrong on this), that search engines used the content and the context - anything seen in lynx could be seen by a search engine?[/QUOTE]You are correct.
You're still doing it wrong and you're still operating under a false assumption. Unless you are using a faulty one, your screen reader will not observe styles directed at the screen. And search engines don't pay attention to the styles at all.[/QUOTE]
yeBut, as for the screen reader, do not know how mine is faulty when, as I have stated before, it clearly reads anything BUT those items set to {display:none}. set an item to {display:none} and that text/navi button is not readable.[/QUOTE]With CSS you can, and should, specify the styles according to the intended media, be they screen, print, or audio or such. You can have something hidden from the screen but shown in the print or whatever. If your screen reader is following the screen styles and not the audio then it is in error. More likely, though, you are specifying the style incorrectly.
0.1.9 — BETA 9.23