Skip to content

Commit

Permalink
(fix) allow keyboard scrolling when a scrollbar is applied to the ele…
Browse files Browse the repository at this point in the history
…ment (#33)

Default to `tabindex="0"` on the internal `<code>` element to allow keyboard scrolling when a scrollbar is applied to the element. This resolves an accessibility issue found by Vue-Axe.
  • Loading branch information
TheJaredWilcurt authored Aug 22, 2022
1 parent 4a9a270 commit c4e3a91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.2

- Default to `tabindex="0"` on the internal `<code>` element to allow keyboard scrolling when a scrollbar is applied to the element. This resolves an accessibility issue found by Vue-Axe. (#33)

## 2.1.1

- add `exports "."` to `package.json` (#27)
Expand Down
1 change: 1 addition & 0 deletions src/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const component = defineComponent({
h('code', {
class: this.className,
innerHTML: this.highlightedCode,
tabindex: '0',
}),
])
},
Expand Down

0 comments on commit c4e3a91

Please sign in to comment.