Re: Attributes created by Dreamweaver

by =?iso-8859-1?Q?St=E9phane?= Bergeron <stephberg(at)videotron.ca>

 Date:  Thu, 11 May 2000 16:32:16 -0400
 To:  hwg-techniques(at)hwg.org
 In-Reply-To:  demon
  todo: View Thread, Original
Hi Denise,

At 11:30 AM 11/05/00 +0100, you wrote:
>I'd be grateful if you could take a look at
>
>  www.raworths.co.uk/legaleye/index.html
>
>and take a look at the source code for this.
>
>The "Legal Eye" section of this website was provided by the firm
>that print paper copies of this leaflet.
>
>I did the work on the main Raworths website and had it all validated
>to HTML 4.0 Transitional.  This Legal Eye spoils it all as you will
>see from the source code that there are odd attributes in the IMG
>SRC ie tracingopacity, tracingsrc.   There is also Javascript in the
>source, but I can't see what for.

The Javascript code is for image mouseovers that don't seem to be there=20
anymore so you can safely delete it.  I don't see the strange image tag=20
attributes you mention so I figure you fixed the code already.  I can=20
assure you that they were not added by Dreamweaver though.  DW does not add=
=20
invalid (and non-existent) attributes like that to the code and the only=20
thing it will add are comment tags to mark up sections of code that are=20
editable or non-editable in templates and libraries.  Other than a little=20
code bloat, they're perfectly harmless.

>I have spoken to the people who did this work and as far as they
>are concerned its all correct, but I explained that there were no
>ALTs for images, DTD at the top etc, but they didn't seem that
>bothered.  They didn't seem to understand the importance of having
>a structurely sound code, it views okay in Netscape and IE4, but
>not in Opera or IE3.

Unfortunately this attitude seems very widespread amongst so called=20
professional developers.  Alt attributes are very important for=20
accessibility and the Doctype Declaration is very important too now and for=
=20
forward compatibility.  Mac IE 5 will render a page differently depending=20
on the type of DTD declared or the absence of it.  Newer browsers will=20
certainly follow that trend too so DTD's are not there "only to please=20
those pesky validators" anymore as I've heard many say on this list and=20
others in the past.

>Can someone please confirm that the tracingopacity etc attributes
>aren't true attributes, I can't find them anywhere in my handbook.

I never heard of them and they are certainly non-standard.  I never heard=20
of any browser using them either but I'd really be curious to know where=20
they come from.

>and also if anyone has had problems with people not understanding
>the need to have correct code, how they have "sold" the need to
>write code to a standard.

Accessibility, plain and simple.  Can any company afford to loose potential=
=20
customers because the HTML in their Web site is so broken that some people=
=20
won't be able to access the content?  It goes much further than valid code=
=20
though... image tags without ALT attributes will validate under HTML 4.0x=20
Transitional but it's very bad practice to leave them out.  It's also bad=20
practice to add the image file name as the ALT text for images that are=20
purely decorative.  Those should have empty ALT attributes.  Other things=20
can come in the way of accessibility too like bad engineering.  Not long=20
ago, I stumbled on a Web site who's front page was comprised of only a=20
JavaScript that directed users to a certain page depending on your=20
browser.  There was nothing else on that page, no text for Search engines,=
=20
no NOSCRIPT content... no meta tags, nothing!  I had JavaScript off when I=
=20
surfed in so all I could see was a blank browser window.  That is a prime=20
example of very bad engineering for many reasons which should be obvious to=
=20
any professional Web developer.

Well I hope that helped and that I wasn't too long winded... ;-)

St=E9phane Bergeron

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA