document.querySelectorAll('.accordion-checkbox').forEach(cbox => { cbox.addEventListener('change', function() { const label = this.previousElementSibling const caret = label.querySelector('.text') if (cbox.checked) { caret.innerHTML = '' } else { caret.innerHTML = '' } }) })