Skip to content

Commit 931e7d9

Browse files
authored
fix($core): #2627 Dup ID violates HTML5-4 (#2650)
1 parent 5fcbd88 commit 931e7d9

File tree

3 files changed

+44
-32
lines changed

3 files changed

+44
-32
lines changed

packages/@vuepress/core/lib/client/components/OutboundLink.vue

+23-22
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
<template>
2-
<svg
3-
class="icon outbound"
4-
xmlns="http://www.w3.org/2000/svg"
5-
aria-labelledby="outbound-link-title"
6-
role="img"
7-
focusable="false"
8-
x="0px"
9-
y="0px"
10-
viewBox="0 0 100 100"
11-
width="15"
12-
height="15"
13-
>
14-
<title id="outbound-link-title">{{ openInNewWindowTitle }}</title>
15-
<path
16-
fill="currentColor"
17-
d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"
18-
/>
19-
<polygon
20-
fill="currentColor"
21-
points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"
22-
/>
23-
</svg>
2+
<span>
3+
<svg
4+
class="icon outbound"
5+
xmlns="http://www.w3.org/2000/svg"
6+
aria-hidden="true"
7+
focusable="false"
8+
x="0px"
9+
y="0px"
10+
viewBox="0 0 100 100"
11+
width="15"
12+
height="15"
13+
>
14+
<path
15+
fill="currentColor"
16+
d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"
17+
/>
18+
<polygon
19+
fill="currentColor"
20+
points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"
21+
/>
22+
</svg>
23+
<span class="sr-only">{{ openInNewWindowTitle }}</span>
24+
</span>
2425
</template>
2526

2627
<script>

packages/@vuepress/theme-default/styles/index.styl

+10
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,16 @@ th, td
189189
.sidebar
190190
top 0
191191

192+
.sr-only
193+
position absolute
194+
width 1px
195+
height 1px
196+
padding 0
197+
margin -1px
198+
overflow hidden
199+
clip rect(0, 0, 0, 0)
200+
white-space nowrap
201+
border-width 0
192202

193203
@media (min-width: ($MQMobile + 1px))
194204
.theme-container.no-sidebar

yarn.lock

+11-10
Original file line numberDiff line numberDiff line change
@@ -12530,15 +12530,15 @@ strip-indent@^2.0.0:
1253012530
version "2.0.0"
1253112531
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68"
1253212532

12533-
strip-json-comments@^2.0.1, strip-json-comments@~2.0.1:
12534-
version "2.0.1"
12535-
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
12536-
1253712533
strip-json-comments@^3.0.1:
1253812534
version "3.0.1"
1253912535
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7"
1254012536
integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==
1254112537

12538+
strip-json-comments@~2.0.1:
12539+
version "2.0.1"
12540+
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
12541+
1254212542
strong-log-transformer@^2.0.0:
1254312543
version "2.1.0"
1254412544
resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10"
@@ -12838,13 +12838,14 @@ textlint-rule-stop-words@^1.0.17:
1283812838
split-lines "^2.0.0"
1283912839
textlint-rule-helper "^2.0.0"
1284012840

12841-
textlint-rule-terminology@^1.1.30:
12842-
version "1.1.30"
12843-
resolved "https://registry.yarnpkg.com/textlint-rule-terminology/-/textlint-rule-terminology-1.1.30.tgz#b9c5e8c665132dea2b141e3fe995316159c2d296"
12841+
textlint-rule-terminology@^2.1.4:
12842+
version "2.1.4"
12843+
resolved "https://registry.yarnpkg.com/textlint-rule-terminology/-/textlint-rule-terminology-2.1.4.tgz#d6004ae65dbe757b2f4c7bd2bf0fe77d202f0c14"
12844+
integrity sha512-kLw4qL8RwY2lCNqgKveHc5sjCDlS5Tdw2TXWOrHvSvQxqaVOwsv3+51oMIQLGfJzQrhFSMlSlw5MvfaOerBvPQ==
1284412845
dependencies:
12845-
lodash "^4.17.4"
12846-
strip-json-comments "^2.0.1"
12847-
textlint-rule-helper "^2.0.0"
12846+
lodash "^4.17.15"
12847+
strip-json-comments "^3.0.1"
12848+
textlint-rule-helper "^2.1.1"
1284812849

1284912850
textlint-rule-write-good@^1.6.2:
1285012851
version "1.6.2"

0 commit comments

Comments
 (0)