Closed Bug 62046 Opened 24 years ago Closed 22 years ago

ALT text isn't displayed when image loading disabled

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

VERIFIED DUPLICATE of bug 41924
Future

People

(Reporter: kazhik, Assigned: attinasi)

References

Details

(Keywords: access, testcase, Whiteboard: [Hixie-P3][Hixie-1.0])

Attachments

(2 files)

ALT text of <img> element isn't displayed when "Do not load any images" in
Preferences is checked.

It is displayed if the <img> element has HEIGHT and WIDTH attributes.
Attached file Testcase
This is a well know problem for a long time now. As I'm told the original
Netscape engineer working on this part of the source, was overburned. It's
interesting to know if he is working at this moment! But you can try to use
Title as well in your source. Try an extended replace on al document. Replace
alt="" with alt="" and title="" that would do the job for now! As we do at this
moment!

Friendly, HJ
Please take a look at bug 62050, title did work, but... It still does in
Netscape 6/6.0.

And this is a dup, I'm sure but which one, there are so many!

Verified, does not work in 2000120504 on WinNT4 SP6
Peter, please triage ASAP. Find the correct owner for this bug and reassign this.
Assignee: clayton → peter.vanderbeken
QA Contact: petersen → lorca
The problem seems to be in mozilla/layout/html/base/src/nsImageFrame.cpp, we try
to fit the "alt" text in the frame, but the frame size is zero, because we
didn't get "height" and "width". Reassigning.
Assignee: peter.vanderbeken → pollmann
Depends on: alttext
Keywords: mozilla1.1
The problem is that we are not fully following my spec in bug 41924, which see.
QA Contact: lorca → ian
*** Bug 65734 has been marked as a duplicate of this bug. ***
Setting milestone to future
Target Milestone: --- → Future
Whiteboard: [Hixie-P3]
*** Bug 86005 has been marked as a duplicate of this bug. ***
"Setting Milestone to Future" - is this the way Mozilla deals severe privacy and
web standards issues?
Without displaying the value of the img 'alt'-attribute disabeling image display
is practically worthless (und thus making it worthless for all those who are
using screenreaders etc.)
It contradicts the HTML specs, because a conforming UA has to show the alt text
if  it can't or doesn't try to render the image provided by the 'src'-attribute.
Thirdly it discourages authors to use alt text propperly.

At least the option "don't load any images" should be removed from the prefs
until this bug is fixed. If it leads to complete information loss at some well
authered sites like http://www.apple.com it should better not be there!
P.S.: Please change 'Plattform:' and OS to 'ALL'!
And "Target Milestone" to something below 'mozilla1.0'
Michael: Would you rather we fix this, or fix a crash? We only have a finite 
number of resources here... (Unless you want to help, that is!)
OS: Windows 2000 → All
Hardware: PC → All
*** Bug 74717 has been marked as a duplicate of this bug. ***
changing topic
Summary: ALT text isn't displayed → ALT text isn't displayed when image loading disabled
Blocks: 90169
*** Bug 93854 has been marked as a duplicate of this bug. ***
Nominating for Mozilla 0.9.4, since this bug makes the imageless mode unusable
in practice. (I'd nominate for Mozilla 0.9.5, but there is no such keyword.)
(This can't be overly complex to fix since alt text work if the image is not found.)
Blocks: html4.01
Keywords: mozilla0.9.4
No longer depends on: alttext
Blocks: 98554
Nasty problem, fixing keywords and moving...
Assignee: pollmann → attinasi
QA Contact: ian → petersen
Whiteboard: [Hixie-P3] → [Hixie-P3][Hixie-1.0]
Adding extra keywords on behalf of fuzzygorilla@euroseek<spam blocked>.com
Keywords: 4xp, access
According to Hixie's alt-text spec, if the "Never display images" pref is set, 
and a image has no width/height specified, we should display the little broken-
image icon next to the alt-text in plain text.

Example:

This is my flower:
<img src="flower.jpg" alt="It has a green stem and five yellow petals.">
Isn't it wonderful?

renders in this case as:

This is my flower: 
[] It has a green stem and five yellow petals. 
Isn't it wonderful?"

Where the [] is the broken-image icon.
...and also if the height and width attributes _are_ set. We just treat the
<img> element as a <span> element (applying any relevant CSS, too).
Attached patch A possible fixSplinter Review
I kind of like the idea of displaying no icon at all if the user has turned off
images. Why waste space?

Here is a fix that does that.

I can also fix it the other way if anyone wants that.
*** Bug 125867 has been marked as a duplicate of this bug. ***
Is anyone interested in getting this fixed?
In response to Comment #23, "yes, people are interested in seeing this fixed".
Unfortunately, I am not a mozilla developer and thus can provide any of the
required reviews - r, sr, or a.  Since there is a patch attached, should this
have the 'patch' or 'review' Keywords added to the bug?

In response to Comment #21, I personally use the preference when surfing via
a dial-up line to avoid the download delays.  In this mode, I would like to
see an icon, so that I can easily download an image if it is critical to the
operation of the web page
(yes, for accessibility purposes, this should never happen, but some site
designers don't think about people who either by choice or chance are not
visually enabled).
Keywords: mozilla1.0+
Keywords: mozilla1.0
Keywords: patch
*** Bug 134589 has been marked as a duplicate of this bug. ***
Does the patch still work?
Is it just me, or does mozilla fail to display alt text ALWAYS, regardless of
whether images are set to load or not ?

I'm running 2002050306.. pretty recent, and have images on, and alt text is
never displayed. I read the comment about using the title tag instead, and tried
it, and that works, but I can't be expected to fix every page on the web and
replace alt with title just to make mozilla display the page correctly..

For example:

<img src=1.jpg title='this is a title'>

displays 'this is a title' when the mouse is held over the image

<img src=1.jpg alt='this is a test'>

displays nothing at all when the mouse is held over it.





Re: comment 27
Mozilla does not display ALT text onmouseover because it is against spec. 
Besides, this bug has nothing to do with mouseover ALT text. 
Well, I just found this in Bug 109090, as a description to an attachment, which
might just explain why this bug is present:
"PATCH to prevent the ALT text and broken image icon from displaying for blocked
images"
I don't understand why the bug was summarized as "[FIX] Blocked image should not
show Broken Icon" but the fix includes a provision to "prevent the ALT text"
from being displayed also.  You may want to confer with those folks before you
go through with the patch.
I think the status quo seems to be that Mozilla defers to the dimensions of the
blocked image if they are given, but collapses it otherwise.
It seems to me that the best fix would be the inclusion of the following set of
preferences:

Display alternate text for blocked images:
( ) No [default]
( ) Yes

Display [future] "blocked image icon" for blocked images:
( ) No [default]
( ) Yes

How much to collapse blocked images:
( ) Collapse as much as possible [default; if alt text and/or icon are requested
to be displayed, can use up to and including either specified dimensions (if
specified), or else some static size to display them; else collapse completely]
( ( ) Defer to dimensions [only when both WIDTH and HEIGHT are given]

I think it would be nice to have these sort of options; can really make everyone
happy on these issues (although I see it makes for a more complex program). 
Notably, I would like to be able to preserve the status quo in deferring to the
image size, but without displaying alt text or an icon, because it's sort of
convenient to be able to right click where a blocked image isn't displayed so as
to be able to choose "Unblock Images from this Server" if I've changed my mind;
but I may find it just as useful to be able to completely collapse the blocked
image; or alternately, to display the alt text for some images; or an icon so I
can see where all the blocke images would be on a page if I didn't block them.
Simplified GUI:

Blocked images:
 [ ] Display alternate text
 [ ] Display "blocked image icon"
 Collapsing: 
  ( ) Collapse as much as possible 
  ( ) Respect specified dimensions 
OK, can the reporter of this test this in a current build?

Here is how it works now.

If all image loading is disabled, Alt text is displayed (for instance 
if you are dialup) This was the original problem in the bug.

If a server is blocked, alt text is not displayed (what most people do 
for ad servers) This was the compromise done for people who didn't 
want to see ad text for blocked ad servers.

I believe that at this point, this bug should be marked fixed.
Merging with bug 41924.

*** This bug has been marked as a duplicate of 41924 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
v
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: