diff --git a/src/js/components/filters.js b/src/js/components/filters.js index e39dde73..7ad9f4e9 100644 --- a/src/js/components/filters.js +++ b/src/js/components/filters.js @@ -218,14 +218,19 @@ class Filters { const techCount = document.querySelectorAll('select.tech[name="tech"]').length; const techNr = techCount + 1; const techId = `tech-${techNr}`; + const techLabel = `Technology ${techNr}`; selectElement.setAttribute('id', techId); labelElement.setAttribute('for', techId); - labelElement.textContent = `Technology ${techNr}`; + labelElement.textContent = techLabel; if(removeButton) { removeButton.dataset.tech = techId; removeButton.classList.remove('hidden'); + const removeIcon = removeButton.querySelector('img'); + const removeIconAlt = removeIcon.getAttribute('alt'); + removeIcon.setAttribute('alt', `${removeIconAlt} ${techLabel}`); + /* Bind functionality to the button */ removeButton.addEventListener('click', this.removeTechnology); }