PDA

View Full Version : code for accessibility and SEO



mannequin-lady
07-03-2009, 09:13 AM
We've had an informative discussion on the Webmaster Resources Discussion Forum. The thread is alt and title attributes in IMG and A tags. (http://www.webproworld.com/webmaster-resources-discussion-forum/86049-alt-title-attributes-img-tags.html)

The example being used is the pirate scene with buccaneer statue (http://www.alldressforms.com/all-mens-boys-males-special-events-occasions-gifts-presents.html).

After much deliberation, this is the code that resulted:



<td>
<a href="pirate-ship-skull-dagger-scene.html" title="Pirate Ship Skull and Dagger Statue"><img src="collectible-knights-warriors-pirates/knights-warriors-pirates-previews/pirate-ship-skull-sword-prev.jpg" alt="pirate ship skull pirates hat buccaneer statue figurine" title="stone resin with cloth sails pirate ship buccaneer statue with a dagger, skull and hat. Buy it now, matey!" width="146" height="106">
<span>Pirate Scene with Buccaneer Statue</span></a>
</td>


Please let me know what needs to be changed or added so that I can use this example for the rest of the products on my website. I'm currently not using CSS, in case that will change the replies.

And, by the way, I do want to have a new window open. That isn't in the above code, but I want it there.

Thank you,
Steph

digital29
04-27-2010, 11:59 AM
<td>
<a href="pirate-ship-skull-dagger-scene.html" title="Pirate Ship Skull and Dagger Statue" target="_blank"><img src="collectible-knights-warriors-pirates/knights-warriors-pirates-previews/pirate-ship-skull-sword-prev.jpg" alt="pirate ship skull pirates hat buccaneer statue figurine" title="stone resin with cloth sails pirate ship buccaneer statue with a dagger, skull and hat. Buy it now, matey!" width="146" height="106">
<span>Pirate Scene with Buccaneer Statue</span></a>
</td>

This one will make the link open in a new windows.
As for implementation in the whole site..I can`t help you with that

HTMLBasicTutor
04-27-2010, 08:16 PM
<td>
<a href="pirate-ship-skull-dagger-scene.html" title="Pirate Ship Skull and Dagger Statue"><img src="collectible-knights-warriors-pirates/knights-warriors-pirates-previews/pirate-ship-skull-sword-prev.jpg" alt="pirate ship skull pirates hat buccaneer statue figurine" title="stone resin with cloth sails pirate ship buccaneer statue with a dagger, skull and hat. Buy it now, matey!" width="146" height="106">
<span>Pirate Scene with Buccaneer Statue</span></a>
</td>
Why do you have the span set of tags in there?

The reply above will open in a new window but:
a) it creates a usability issue

Your links open in the same window.
Visitors want to have control over everything what happens in their browser. If they’d like to open a link in a new window they will. If they don’t want to, they won’t. If your links open in a new window you make the decision which is not your decision to make.
http://smashingmagazine.com/2007/09/27/10-usability-nightmares-you-should-be-aware-of/ - 10 Usability Nightmares You Should Be Aware Of

b) it creates an accessibility issue ( part of the point according to the title of this thread)
http://diveintoaccessibility.org/day_16_not_opening_new_windows.html - Not opening new windows - Dive Into Accessibility
http://webaim.org/techniques/hypertext/hypertext_links.php#new_window - Links to New Windows, Pop-ups, Other Frames, or External Web Sites - WebAIM

Add your domain name to the front of the url for SEO.