Skip to content

Commit

Permalink
fix($core): #2627 Dup ID violates HTML5-4 (#2650)
Browse files Browse the repository at this point in the history
  • Loading branch information
adico1 committed Oct 13, 2020
1 parent 5fcbd88 commit 931e7d9
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 32 deletions.
45 changes: 23 additions & 22 deletions packages/@vuepress/core/lib/client/components/OutboundLink.vue
@@ -1,26 +1,27 @@
<template>
<svg
class="icon outbound"
xmlns="http://www.w3.org/2000/svg"
aria-labelledby="outbound-link-title"
role="img"
focusable="false"
x="0px"
y="0px"
viewBox="0 0 100 100"
width="15"
height="15"
>
<title id="outbound-link-title">{{ openInNewWindowTitle }}</title>
<path
fill="currentColor"
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"
/>
<polygon
fill="currentColor"
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"
/>
</svg>
<span>
<svg
class="icon outbound"
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
focusable="false"
x="0px"
y="0px"
viewBox="0 0 100 100"
width="15"
height="15"
>
<path
fill="currentColor"
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"
/>
<polygon
fill="currentColor"
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"
/>
</svg>
<span class="sr-only">{{ openInNewWindowTitle }}</span>
</span>
</template>

<script>
Expand Down
10 changes: 10 additions & 0 deletions packages/@vuepress/theme-default/styles/index.styl
Expand Up @@ -189,6 +189,16 @@ th, td
.sidebar
top 0

.sr-only
position absolute
width 1px
height 1px
padding 0
margin -1px
overflow hidden
clip rect(0, 0, 0, 0)
white-space nowrap
border-width 0

@media (min-width: ($MQMobile + 1px))
.theme-container.no-sidebar
Expand Down
21 changes: 11 additions & 10 deletions yarn.lock
Expand Up @@ -12530,15 +12530,15 @@ strip-indent@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68"

strip-json-comments@^2.0.1, strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"

strip-json-comments@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7"
integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==

strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"

strong-log-transformer@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10"
Expand Down Expand Up @@ -12838,13 +12838,14 @@ textlint-rule-stop-words@^1.0.17:
split-lines "^2.0.0"
textlint-rule-helper "^2.0.0"

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

textlint-rule-write-good@^1.6.2:
version "1.6.2"
Expand Down

0 comments on commit 931e7d9

Please sign in to comment.