diff --git a/resources/js/archive-template-publications.js b/resources/js/archive-template-publications.js index 4d63673..58578e5 100644 --- a/resources/js/archive-template-publications.js +++ b/resources/js/archive-template-publications.js @@ -73,6 +73,7 @@ function toggleActivePublicationTypeFilterButton() { filterButtons.forEach((button) => { button.classList.remove('filters-toolbar__action-button--active'); + button.setAttribute('aria-pressed', 'false'); }); const correspondingActiveThematiqueButton = document.querySelector( @@ -81,6 +82,7 @@ function toggleActivePublicationTypeFilterButton() { if (!correspondingActiveThematiqueButton) return; correspondingActiveThematiqueButton.classList.add('filters-toolbar__action-button--active'); + correspondingActiveThematiqueButton.setAttribute('aria-pressed', 'true'); } function updateActiveThematiquesFiltersViewer() { const activeFilters = document.querySelectorAll( @@ -106,7 +108,15 @@ function updateActiveThematiquesFiltersViewer() { activeFilters.forEach((activeFilterCheckbox) => { const button = document.createElement('button'); button.classList.add('filters-toolbar__action-button--active-filter-remover'); - button.innerText = activeFilterCheckbox.getAttribute('data-title'); + + const span = document.createElement('span'); + span.classList.add('sr-only'); + span.innerText = mainAppJsDynamicDatas.deleteFilter + ' :'; + button.appendChild(span); + + const buttonText = document.createTextNode(activeFilterCheckbox.getAttribute('data-title')); + button.appendChild(buttonText); + button.setAttribute('value', activeFilterCheckbox.getAttribute('value')); activeFiltersContainer.appendChild(button);