Skip to content

Commit

Permalink
Merge pull request #42 from 0918nobita/v0.4.1-improve-accessibility
Browse files Browse the repository at this point in the history
Set `aria-hidden` & `lang` attributes
  • Loading branch information
0918nobita authored Dec 30, 2023
2 parents 240d99b + 96e40e0 commit 4815723
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/code-block-processor/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,16 @@ export const codeBlockProcessor = async (

const container = element.createDiv({
cls: styles.container,
attr: {
lang: 'zh-CN',
},
});

const pinyinLine = container.createDiv({
cls: styles.pinyinLine,
attr: {
'aria-hidden': true,
},
}) as PinyinLine;

const zhCharLine = container.createDiv({
Expand Down

0 comments on commit 4815723

Please sign in to comment.