mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 19:25:43 +00:00
Bug 245370. Make autocomplete dropdowns accessible. Relanding relevant parts of first patch following landing of aviary branch - previously reviewed
This commit is contained in:
parent
2ea1bb6c18
commit
474a8fb457
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user