alt text does not change if changed via JavaScript

RESOLVED WORKSFORME

Status

()

Core
Layout
--
major
RESOLVED WORKSFORME
12 years ago
10 years ago

People

(Reporter: Graham Harris, Unassigned)

Tracking

1.0 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4

If i use the following JavaScript:

function setImageUp(src, altText)
{
    var image = document.getElementById('TitleImage');
	image.src = src;
	image.alt = altText;
	image.title = altText;
}

the alt text displayed in Firefox does not change yet it has changed in the attribute inspector.

Reproducible: Always

Steps to Reproduce:
1. Create a web page that has an image with an id of TitleImage
2. Set the alt text to 'Firefox Rocks!'
3. Using the JavaScript change the image and the alt text to 'This does not show'

Actual Results:  
The text 'Firefox Rocks!' remains but in the properties dialogue the alt text has changed.

Expected Results:  
The alt text should have changed.

about:buildconfig

Build platform
target
i586-pc-msvc

Build tools
Compiler 	Version 	Compiler flags
$(CYGWIN_WRAPPER) cl 	12.00.8804 	-TC -nologo -W3 -Gy -Fd$(PDBFILE)
$(CYGWIN_WRAPPER) cl 	12.00.8804 	-TP -nologo -W3 -Gy -Fd$(PDBFILE)

Configure arguments
--enable-application=browser --enable-update-channel=release --enable-optimize --disable-debug --disable-tests --enable-static --disable-shared --enable-official-branding --enable-svg --enable-canvas --enable-update-packaging

Comment 1

12 years ago
And again I keep saying is re-install firefox so you'll all not have a problem with javascripts.

Updated

12 years ago
Component: Disability Access → Layout
Product: Firefox → Core
Version: unspecified → 1.0 Branch
(Reporter)

Comment 2

12 years ago
(In reply to comment #1)
> And again I keep saying is re-install firefox so you'll all not have a problem
> with javascripts.
> 

OK then on the web sites that use JavaScript we should now have a banner that says "If you are using Firefox and are having problems with JavaScript re-install FireFox". Not very good eh? Not to mention the fact that not all users know a) what JavaScript is and b) do not want the hasle of re-installing FireFox.
QA Contact: disability.access → layout

Comment 3

12 years ago
Created attachment 228607 [details]
testcase

This testcase does work with a trunk build.  But not 1.5.0.4 or Bon Echo.

Comment 4

12 years ago
I'll confirm that this issue is present in Firefox 1.5.0.7.

1. Go to http://jsg.byethost4.com/demos/DIC19380/ and hover over the images noting how the mouseover effect is utilized.
2. Disable images and note that when you mouse over the images, the alternate text is not updated on screen. "Article A" should change to "Article C" and "Article B" to "Article D" when the former two are hovered over, but they don't.
3. What /does/ correctly change is the "Element Properties" dialogue. To see the change, keep your cursor over the (erroneous) "Article A" or "Article B" text, right-click, and press "P" to access the "Properties" menu item. Note that if you move the mouse to the menu item you won't see the change because you'll have moused out.

This means a lack of accessibility.

Comment 5

11 years ago
Revisiting this bug the testcase works for me with 1.5.0.10 and 2.0.0.2.

Comment 6

11 years ago
(In reply to comment #5)
> Revisiting this bug the testcase works for me with 1.5.0.10 and 2.0.0.2.

Firefox 2.0.0.2 seems to pass your test but it still fails mine. The alternate text is only updated in the Properties dialog when images are disabled.

Comment 7

10 years ago
The URL in this bug is now 404.  Reopen if there's new URL and the problem still occurs with Firefox 3.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.