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!

Alt attribute in HTML image code

Postby garethjmsaunders » Wed Dec 06, 2006 2:03 pm

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
User avatar
garethjmsaunders
 
Posts: 65
Joined: Fri Dec 02, 2005 5:08 pm
Location: Anstruther, UK

Postby ebarstad » Wed Dec 06, 2006 11:32 pm

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
ebarstad
 
Posts: 19
Joined: Sun Mar 05, 2006 9:19 pm

No border, but alt attribute value empty

Postby garethjmsaunders » Thu Dec 07, 2006 12:48 am

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
garethjmsaunders
 
Posts: 65
Joined: Fri Dec 02, 2005 5:08 pm
Location: Anstruther, UK

Postby syrupcore » Sun Dec 10, 2006 10:57 pm

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
syrupcore
Top Contributor
 
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa

Postby kfury77 » Sun Jan 21, 2007 4:36 pm

I fourth this idea! I'd really like to see this in WeBuilder 2007
User avatar
kfury77
 
Posts: 97
Joined: Mon Jun 13, 2005 11:55 pm
Location: Osaka, Japan

Postby snake*sl » Mon Jan 29, 2007 4:12 pm

Me, too! Better alt="" instead of border="0".
snake*sl
 
Posts: 9
Joined: Mon Jan 29, 2007 4:10 pm
Location: Iserlohn, Germany

Postby Karlis » Thu Mar 08, 2007 11:21 pm

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
Karlis
Site Admin
 
Posts: 3601
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe

Postby syrupcore » Fri Mar 09, 2007 1:05 am

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 ;).
User avatar
syrupcore
Top Contributor
 
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa


Return to HTMLPad / Rapid CSS / Rapid PHP / WeBuilder Feature Requests

Who is online

Users browsing this forum: No registered users and 27 guests

cron