- commit
- ac628dd89913bc57409b98dbb03c322ccafb6231
- parent
- 74b15310552e80bf48b435e075e2a185e0f46166
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2023-08-30 12:14
use format strings
Diffstat
| M | select.js | 4 | ++-- |
| M | tags.js | 2 | +- |
2 files changed, 3 insertions, 3 deletions
diff --git a/select.js b/select.js
@@ -87,7 +87,7 @@ export class Select {
87 87 li.setAttribute('aria-selected', op.selected);
88 88 });
89 89 this.wrapper.setAttribute('aria-expanded', 'true');
90 -1 this.input.setAttribute('aria-activedescendant', this.id + '_option_' + this.indexMap[this.focus]);
-1 90 this.input.setAttribute('aria-activedescendant', `${this.id}_option_${this.indexMap[this.focus]}`);
91 91 options[this.focus].scrollIntoView({block: 'nearest'});
92 92 } else {
93 93 this.wrapper.setAttribute('aria-expanded', 'false');
@@ -123,7 +123,7 @@ export class Select {
123 123
124 124 createOption(op, i) {
125 125 var li = create('<li role="option">');
126 -1 li.id = this.id + '_option_' + i;
-1 126 li.id = `${this.id}_option_${i}`;
127 127 li.textContent = op.label;
128 128 if (op.disabled) {
129 129 li.setAttribute('aria-disabled', 'true');
diff --git a/tags.js b/tags.js
@@ -33,7 +33,7 @@ export class TagInput {
33 33
34 34 this.datalist = document.createElement('datalist');
35 35 this.datalist.innerHTML = this.original.innerHTML;
36 -1 this.datalist.id = this.id + '-list';
-1 36 this.datalist.id = `${this.id}-list`;
37 37 this.input.setAttribute('list', this.datalist.id);
38 38 this.wrapper.append(this.datalist);
39 39