Skip to content

Commit c4e3a91

Browse files
(fix) allow keyboard scrolling when a scrollbar is applied to the element (#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.
1 parent 4a9a270 commit c4e3a91

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.1.2
2+
3+
- 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)
4+
15
## 2.1.1
26

37
- add `exports "."` to `package.json` (#27)

src/vue.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ const component = defineComponent({
6868
h('code', {
6969
class: this.className,
7070
innerHTML: this.highlightedCode,
71+
tabindex: '0',
7172
}),
7273
])
7374
},

0 commit comments

Comments
 (0)