Skip to content
Snippets Groups Projects
Unverified Commit 5414d2dd authored by Olivia Simonet's avatar Olivia Simonet Committed by GitHub
Browse files

[A11Y] Table des matières (#586)

parent 805eae63
No related branches found
No related tags found
No related merge requests found
......@@ -116,11 +116,13 @@ class TableOfContents {
this.links.forEach((link) => {
if (link === currentLink) {
link.classList.add(CLASSES.linkActive);
link.setAttribute('aria-current', 'true');
this.updateCtaTitle(link);
this.state.id = id;
this.state.currentLink = link;
} else {
link.classList.remove(CLASSES.linkActive)
link.classList.remove(CLASSES.linkActive);
link.removeAttribute('aria-current');
}
});
}
......
......@@ -6,7 +6,7 @@
<div class="toc-container" aria-hidden="false" aria-labelledby="toc-title">
<div class="toc-content">
{{/* TODO : quelle balise pour le titre du toc ? */}}
<div id="toc-title" class="toc-title">{{ i18n "commons.toc" }}</div>
<div id="toc-title" class="toc-title" role="heading">{{ i18n "commons.toc" }}</div>
{{- partial (printf .toc) . -}}
<button name="{{ i18n "commons.close" }}">{{ i18n "commons.close" }}</button>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment