Alt attribute in HTML image code

Let us know what you would like to see in the next version of this software

Moderator: kfury77

Forum rules
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
  • Do not create new topics for already requested features. Add your comments to the existing feature request topics instead;
  • Create separate topic for each feature suggestion. Do NOT post a number of non-related feature suggestions in a single topic;
  • Give your topic a meaningful title. Do NOT create topics with meaningless titles, such as "My Suggestion" or "My Problem".
Please note that we DO READ all suggestions, even if a reply is not posted. Thanks!
Post Reply
User avatar
garethjmsaunders
Posts: 65
Joined: Fri Dec 02, 2005 5:08 pm
Location: Anstruther, UK
Contact:

Alt attribute in HTML image code

Post by garethjmsaunders »

In WeBuilder 2006 when you drag and drop an image file from the File Explorer into an HTML document it automatically inserts the appropriate code, e.g.

<img src="image.gif" width="45" height="45" border="0" />

Any chance that this could include a blank alt attribute (alt="") so that my code validates immediately and reminds me (and other users) to include an accessible alternative text description?

So it would insert something like

<img src="image.gif" width="45" height="45" border="0" alt="" />

Thanks

Gareth
ebarstad
Posts: 19
Joined: Sun Mar 05, 2006 9:19 pm

Post by ebarstad »

I second this. The border attribute should be removed, though. I'd also like it if it automatically placed the file name in the alt attribute. Using the example above:

Code: Select all

<img src="image.gif" width="45" height="45" alt="image" />
Eric Barstad
Shadow Box: Websites for Non-Profits
HTML Editor Reviews: Reviews and Discussion of (X)HTML Coding Tools
User avatar
garethjmsaunders
Posts: 65
Joined: Fri Dec 02, 2005 5:08 pm
Location: Anstruther, UK
Contact:

No border, but alt attribute value empty

Post by garethjmsaunders »

Fair point about the border attribute as this should be styled with CSS. However, I'm not convinced that the file name as the value for the alt attribute is satisfactory.

This is from the W3C (http://www.w3.org/QA/Tips/altAttribute):
What should I put in my alt attribute?

The generic rule for the content of the alt attribute is: use text that fulfills the same function as the image.

Some more specific rules:
  • if the image is simply decorated text , put the text in the alt attribute
  • if the image is used to create bullets in a list, a horizontal line, or other similar decoration, it is fine to have an empty alt attribute (e.g., alt=""), but it is better to use things like list-style-image in CSS
  • if the image presents a lot of important information, try to summarize it in a short line for the alt attribute and add a longdesc link to a more detailed description
Unless you name your images with long, highly descriptive filenames I'm not convinced that this approach would suffice. Best to leave the alt attribute's value empty and allow users to use their judgement to provide the most suitable text in my opinion.
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Post by syrupcore »

yay!

see karlis, I'm not crazy. ;)

totally agree that auto inserting the file name into the alt attribute is a bad bad idea. I'd just have to delete it every time because it doesn't help anyone - except it'll help developers become lazy and that's what we're trying to get away from!

I usually just let the border attribute stay in there while building the page and then do a find and replace from border="0" to alt="" .

I understand that a lot of people find the border="0" attribute useful (including the man himself) but if the doctype is strict then it shouldn't be included.

will
User avatar
kfury77
Posts: 97
Joined: Mon Jun 13, 2005 11:55 pm
Location: Osaka, Japan
Contact:

Post by kfury77 »

I fourth this idea! I'd really like to see this in WeBuilder 2007
snake*sl
Posts: 9
Joined: Mon Jan 29, 2007 4:10 pm
Location: Iserlohn, Germany
Contact:

Post by snake*sl »

Me, too! Better alt="" instead of border="0".
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Post by Karlis »

Ok, I shall add this but if I receive complaints I will remove it again :D As for the border="0" I dunno... maybe that should be removed.

Personally I hate chasing vaildity. For me the main thing is that the code is clean and that it works :)
Karlis Blumentals
Blumentals Software
www.blumentals.net
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Post by syrupcore »

Karlis wrote:As for the border="0" I dunno... maybe that should be removed.
Please, dump it! :D

chasing validation may be a waste of time for some but understand that some of us create sites for clients who demand it - there is no choice in the matter (if we wanna eat ;).
Post Reply