Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

outline nav does not has duplicative assistive tech-exclusive text [#3800] #3803

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions src/client/theme-default/components/VPDocAsideOutline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ useActiveAnchor(container, marker)
</script>

<template>
<div
<nav
aria-labelledby="doc-outline-aria-label"
class="VPDocAsideOutline"
:class="{ 'has-outline': headers.length > 0 }"
ref="container"
Expand All @@ -34,16 +35,18 @@ useActiveAnchor(container, marker)
<div class="content">
<div class="outline-marker" ref="marker" />

<div class="outline-title" role="heading" aria-level="2">{{ resolveTitle(theme) }}</div>
<div
aria-level="2"
class="outline-title"
id="doc-outline-aria-label"
role="heading"
>
{{ resolveTitle(theme) }}
</div>

<nav aria-labelledby="doc-outline-aria-label">
<span class="visually-hidden" id="doc-outline-aria-label">
Table of Contents for current page
</span>
<VPDocOutlineItem :headers="headers" :root="true" />
</nav>
<VPDocOutlineItem :headers="headers" :root="true" />
</div>
</div>
</nav>
</template>

<style scoped>
Expand Down