Skip to content

Commit 2e10076

Browse files
committed
fix: add js again to fix account page accessibility
1 parent 15b9b1e commit 2e10076

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

decidim-core/app/views/layouts/decidim/shared/_layout_user_profile.html.erb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,17 @@
2929
</section>
3030
</div>
3131
<% end %>
32+
<script>
33+
// remove not necessary attributes on ul added on js
34+
const ul = document.querySelector('#dropdown-menu-profile')
35+
document.addEventListener("DOMContentLoaded", function(event) {
36+
setTimeout(() => {
37+
ul.removeAttribute("tabindex")
38+
ul.removeAttribute("role")
39+
}, 250)
40+
});
41+
// avoid change value of aria-hidden when clicking anywhere on window
42+
window.addEventListener("click", function(){
43+
ul.setAttribute("aria-hidden", "false")
44+
})
45+
</script>

0 commit comments

Comments
 (0)