Open Bug 1469779 Opened 7 years ago Updated 2 years ago

EVENT_OBJECT_LOCATIONCHANGE not fired for objects moved by JavaScript with certain attributes

Categories

(Core :: Disability Access APIs, enhancement, P5)

60 Branch
enhancement

Tracking

()

People

(Reporter: mike.hill, Unassigned)

Details

If JavaScript on a page changes the location of an object, then an EVENT_OBJECT_LOCATIONCHANGE is not fired for that object. If a screen reader/magnifier is tracking based on the location of the object and caching the location (to reduce the number of IAccessible calls it has to do), it does not know to update it's locations and ends up hilighting the wrong location on the screen. // test case to replicate bug <!DOCTYPE html> <html> <head> <script type="text/javascript"> function movedivtranslate() { document.getElementById('transform').style.transform="translate(-100px,20px)"; } function movediv() { document.getElementById('transform').style.margin="45px"; } </script> <title>Transform-translate example</title> </head> <body> <p onClick="movedivtranslate()">Click this text to move the div with a translate</p> <p onClick="movediv()">Click this text to move the div by changing the margin</p> <div id="transform" style="transform:translate(100px,0)"> <div id="divOver" style="height:300px; width:300px; background-color:grey;" > <span>This object can be moved</span> </div></div> </body>
That'd be probably a challenge to implement this event, since Firefox never fired it, and we don't have any hook in code to do that easily. For the reference, here's Mike's use case 1466551#c4.
Priority: -- → P5
Ok. I was trying to avoid calling accLocation() more than I had to. The only workaround I can think of to ensure the visible screen reader highlight is always at the screen location, is to continually call accLocation() on a timer, just in case it might have changed. I shouldn't have to poll for changes in what should be an event driven system.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.