mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
Bug 1568453: Remove the label function from autocomplete-richlistitem so that screenreaders obtain the names of autocomplete items directly from the CE markup. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D47643 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
3c71516d2b
commit
81a27172b7
@ -109,7 +109,7 @@
|
||||
<hbox class="ac-separator" align="center">
|
||||
<description class="ac-separator-text" value="—"/>
|
||||
</hbox>
|
||||
<hbox class="ac-url" align="center">
|
||||
<hbox class="ac-url" align="center" aria-hidden="true">
|
||||
<description class="ac-text-overflow-container">
|
||||
<description class="ac-url-text"/>
|
||||
</description>
|
||||
@ -150,23 +150,6 @@
|
||||
return this.querySelector(".ac-action-text");
|
||||
}
|
||||
|
||||
get label() {
|
||||
// This property is a string that is read aloud by screen readers,
|
||||
// so it must not contain anything that should not be user-facing.
|
||||
|
||||
let parts = [this.getAttribute("title"), this.getAttribute("displayurl")];
|
||||
let label = parts.filter(str => str).join(" ");
|
||||
|
||||
// allow consumers that have extended popups to override
|
||||
// the label values for the richlistitems
|
||||
let panel = this.parentNode.parentNode;
|
||||
if (panel.createResultLabel) {
|
||||
return panel.createResultLabel(this, label);
|
||||
}
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
get _stringBundle() {
|
||||
if (!this.__stringBundle) {
|
||||
this.__stringBundle = Services.strings.createBundle(
|
||||
|
Loading…
Reference in New Issue
Block a user