fix a11y errors

This commit is contained in:
Beverly Nguyen
2024-11-05 14:35:22 -08:00
parent ff194b2f2b
commit 7a63fcfc08
4 changed files with 11 additions and 10 deletions

View File

@@ -73,10 +73,16 @@
);
this.update = () => {
const isEmpty = this.$textbox.val().trim() === "";
this.$background.html(
this.highlightPlaceholders ? this.contentReplaced() : this.contentEscaped()
);
if (isEmpty) {
this.$background.html(
this.highlightPlaceholders ? this.contentReplaced() : this.contentEscaped()
);
this.$background.show();
} else {
this.$background.hide();
}
this.resize();