Bug 245370. Make autocomplete dropdowns accessible. Relanding relevant parts of first patch following landing of aviary branch - previously reviewed

This commit is contained in:
aaronleventhal%moonset.net 2004-12-02 21:17:15 +00:00
parent 2ea1bb6c18
commit 474a8fb457

View File

@ -238,8 +238,17 @@
<!-- =================== PUBLIC MEMBERS =================== -->
<property name="value"
onget="return this.mInputElt.value;"
onset="this.mIgnoreInput = true; this.mInputElt.value = val; this.mIgnoreInput = false; return val;"/>
onget="return this.mInputElt.value;">
<setter><![CDATA[
this.mIgnoreInput = true;
this.mInputElt.value = val;
this.mIgnoreInput = false;
var event = document.createEvent('Events');
event.initEvent('ValueChange', true, true);
this.mInputElt.dispatchEvent(event);
return val;
]]></setter>
</property>
<property name="focused" readonly="true"
onget="return this.getAttribute('focused') == 'true';"/>
@ -475,6 +484,11 @@
this.tree.view.selection.select(val);
if (this.tree.treeBoxObject.height > 0)
this.tree.treeBoxObject.ensureRowIsVisible(val < 0 ? 0 : val);
// Fire select event on xul:tree so that accessibility API
// support layer can fire appropriate accessibility events.
var event = document.createEvent('Events');
event.initEvent("select", true, true);
this.tree.dispatchEvent(event);
return val;
]]></setter>
</property>