Tk Library Source Code

View Ticket
Login
Ticket UUID: 1176744
Title: counter, improper use of alt=
Type: Bug Version: None
Submitter: davygrvy Created on: 2005-04-05 02:06:59
Subsystem: counter Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2005-04-12 09:38:12
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2005-04-12 02:38:12
Description:
It should be title= as firefox doesn't (correctly)
display a tooltip for alt.

RCS file:
/cvsroot/tcllib/tcllib/modules/counter/counter.tcl,v
retrieving revision 1.18
diff -c -r1.18 counter.tcl
*** counter.tcl3 Oct 2004 23:06:55 -00001.18
--- counter.tcl5 Apr 2005 02:04:43 -0000
***************
*** 1019,1025 ****
          set img src=$options(-images)/$options(-gif)
      }
      append result "<td valign=bottom><img $img
height=$height\
!         width=$options(-width) alt=$value></td>\n"
      }
      append result "</tr>"
  
--- 1019,1025 ----
          set img src=$options(-images)/$options(-gif)
      }
      append result "<td valign=bottom><img $img
height=$height\
!         width=$options(-width) title=$value></td>\n"
      }
      append result "</tr>"
User Comments: andreas_kupries added on 2005-04-12 09:38:12:
Logged In: YES 
user_id=75003

Ok, changing the head to now use both "alt" and "title".

davygrvy added on 2005-04-08 13:13:38:
Logged In: YES 
user_id=7549

http://www.htmlhelp.org/reference/html40/special/img.html:
"
The required ALT attribute provides alternate text for those
not loading images.
"

http://www.htmlhelp.org/reference/html40/attrs.html:
"
The TITLE attribute provides a title for an element and is
commonly implemented as a "tooltip" on visual browsers
"

I had always thought alt was for a tooltip since the days of
IE4, just cause I was used to it..  I had never known it was
wrong until I started using firefox.

Some recomendations have said to use both alt and title
until M$ fixes IE to conform to the W3 standard of HTML
4.01.  I read that on the firefox FAQ sometime ago.

andreas_kupries added on 2005-04-08 13:10:21:
Logged In: YES 
user_id=75003

Committed to head.

andreas_kupries added on 2005-04-08 13:06:21:
Logged In: YES 
user_id=75003

Ok

davygrvy added on 2005-04-08 12:55:24:
Logged In: YES 
user_id=7549

just search for 'alt=' and replace it with 'title='

There's only one in modules/counter/counter.tcl

davygrvy added on 2005-04-08 12:45:51:
Logged In: YES 
user_id=7549

no idea, but the W3 docs say that's how to set the data for
such a thing. 'alt' is for display in text-only browsers and
is not documented to carry the data a tooltip might want. 
Whereas 'title' is documented to carry such info.

andreas_kupries added on 2005-04-08 12:38:10:
Logged In: YES 
user_id=75003

How does MSIE react to the use of the "title" attribute,
instead of "alt" ?

andreas_kupries added on 2005-04-08 12:30:18:
Logged In: YES 
user_id=75003

Please attach the patch.