Bug 955056 - Some screen readers say the word "frame" a lot when moving the selection in the contacts list, r=florian.

This commit is contained in:
aleth 2012-08-30 00:34:21 +02:00
Родитель d77c00983e
Коммит 1b9cbe4284
3 изменённых файлов: 21 добавлений и 0 удалений

Просмотреть файл

@ -785,6 +785,16 @@ var buddyList = {
if (!item || !item.parentNode) // empty list or item no longer in the list
return;
item.keyPress(aEvent);
},
buddylistboxFocus: function() {
let selectedItem = document.getElementById("buddylistbox").selectedItem;
if (selectedItem) {
// Ensure binding changes immediately to avoid the firing of a
// spurious accessibility focus event referring to the old binding that
// causes problems for screen readers (BIO bug 1626, BMO bug 786508)
selectedItem.getBoundingClientRect();
}
}
};

Просмотреть файл

@ -156,6 +156,7 @@
crop="end" class="listboxHeader"/>
<richlistbox id="buddylistbox"
onkeypress="buddyList.keyPress(event);"
onfocus="buddyList.buddylistboxFocus();"
tooltip="buddyTooltip"/>
<spacer id="listSpacer" flex="1"/>
</notificationbox>

Просмотреть файл

@ -511,6 +511,16 @@
this._DragLeave();
]]>
</handler>
<handler event="DOMAttrModified">
<![CDATA[
if (event.attrName != "selected" || !event.newValue)
return;
// Ensure binding changes immediately to avoid the firing of a
// spurious accessibility focus event referring to the old binding
// that causes problems for screen readers (bugs BIO 1626, BMO 786508)
this.getBoundingClientRect();
]]>
</handler>
</handlers>
</binding>