Last modified: 2008-08-30 11:26:47 UTC
You forgot the alt= text: <div class="portlet" id="p-logo"> <a style="background-image: url(/skins/common/images/tzbus.png);" href="/index.php?title=%E9%A6%96%E9%A0%81" title="首頁"></a> </div>
The "a" element doesn't support an "alt" attribute. It does, however, support a "title" element, which is present.
Dan, ALT attribute is an attribute for the IMG tag. Its usage is to show an "alternative text" in browsers which do not load images. This could help the end user to understand what image he was supposed to see if he could load the images. Internet Explorer shows the contents of the ALT attribute in a tooltip, when the mouse pointer is placed over the image. Regarding the HTML standards, the TITLE attribute should be used for this effect. Other --more standards compliant-- browsers don't show a tooltip if an ALT but no TITLE is assigned. Regarding HTML standards, all IMG tags should have an ALT attribute. TITLE attribute is never mandatory. Also, an ALT is not necessary when an image is shown without using an IMG tag, just like the above example code you posted, where the image is loaded through a CSS background command.
Sorry, this is still driving me bananas. Try this: In firefox preferences, turn off "Load images automatically" and turn off "Enable Javascript". Then browse some page on en.wikipedia.org. Now looking around the edges of the page look for a safe white empty area to click to change the focus of your mouse, like one seems to sometimes wish to, (e.g., I want to next search the whole page, not just the edit box.) Oops, darn. If one just happend to click in the boobytrapped upper left corner, we now get hijacked to the Main_Page. Gee, looked just as white as other white spaces, but in fact it was landmined with an unnamed link. (Why do I turn off images? Cause I don't want all those silly flags of each nation, etc. seen on some articles, filling up my telephone wires, etc.) OK, indeed, I see the tooltip, but it is already too late as I have already slid my mouse there and clicked without waiting for tooltips, thinking it was safe. And indeed, the pointer even changed from an arrow to a hand even faster. But not fast enough: we intellectual types look at the screen, choose where we want to go, and then go there and click, not delaying to see if it is still as safe as it looked when we were in the planning where to go stage. Anyway, feel free to close the bug again. Just wanted you to know what it feels like from an "useit.com/alertbox" perspective. OK, can't use "alt". Then use something else or make it so you can use "alt". One can't see tooltips or different cursors until it is too late... "I trusted Wikipedia. Now I find it is one of those sites where you have to double check what you are about to click on. It's slowing me down and shaking my confidence." --Martha A. Consumer
If you could keep the hyperbole and drama out of bug reports, that would be super.
Wrong issue since the title link is already present on the <a> element.