mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1801138 - Ensure empty label values don't collapse. r=dao
Add a zwsp character to ensure they're not considered an empty line. Differential Revision: https://phabricator.services.mozilla.com/D162301
This commit is contained in:
parent
5637f65d5d
commit
4f69b540a6
@ -65,9 +65,20 @@
|
||||
|
||||
this.finalCheck = function setValue_finalCheck()
|
||||
{
|
||||
var tree =
|
||||
let tree =
|
||||
{ LABEL: [] };
|
||||
if (aValue != kNoValue) {
|
||||
|
||||
const expectChild = (() => {
|
||||
if (aValue === kNoValue) {
|
||||
return false;
|
||||
}
|
||||
if (aValue === "") {
|
||||
return this.labelNode.nodeName == "label";
|
||||
}
|
||||
return true;
|
||||
})();
|
||||
|
||||
if (expectChild) {
|
||||
tree.LABEL.push({ STATICTEXT: [ ] });
|
||||
}
|
||||
testAccessibleTree(aID, tree);
|
||||
@ -119,7 +130,7 @@
|
||||
|
||||
gQueue.push(new setValue("label", "shiroka strana", kRecreated));
|
||||
gQueue.push(new setValue("label", "?<>!+_", kTextChanged, "shiroka strana"));
|
||||
gQueue.push(new setValue("label", "", kTextRemoved, "?<>!+_"));
|
||||
gQueue.push(new setValue("label", "", kRecreated));
|
||||
gQueue.push(new setValue("label", kNoValue, kRecreated));
|
||||
|
||||
gQueue.push(new setValue("descr", "hello world", kRecreated));
|
||||
|
@ -167,6 +167,10 @@ description[value]::before {
|
||||
display: block;
|
||||
}
|
||||
|
||||
label[value=""]::before {
|
||||
content: "\200B"; /* zwsp */
|
||||
}
|
||||
|
||||
label[value][crop]::before,
|
||||
description[value][crop]::before {
|
||||
min-width: 0;
|
||||
|
Loading…
Reference in New Issue
Block a user