Skip to content

Commit

Permalink
Fix missing aria-pressed attribute on 'toggle word wrap' button (micr…
Browse files Browse the repository at this point in the history
  • Loading branch information
iclanton committed Mar 27, 2024
1 parent 149cb0b commit d018a38
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
3 changes: 2 additions & 1 deletion common/config/rush/pnpm-config.json
Expand Up @@ -180,7 +180,8 @@
*/
"globalPatchedDependencies": {
"docusaurus-theme-search-typesense@0.9.0": "patches/docusaurus-theme-search-typesense@0.9.0.patch",
"typesense-docsearch-react@0.2.3": "patches/typesense-docsearch-react@0.2.3.patch"
"typesense-docsearch-react@0.2.3": "patches/typesense-docsearch-react@0.2.3.patch",
"@docusaurus/theme-classic@2.3.1": "patches/@docusaurus__theme-classic@2.3.1.patch"
},

/**
Expand Down
16 changes: 12 additions & 4 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions common/pnpm-patches/@docusaurus__theme-classic@2.3.1.patch
@@ -0,0 +1,12 @@
diff --git a/lib/theme/CodeBlock/WordWrapButton/index.js b/lib/theme/CodeBlock/WordWrapButton/index.js
index 58330cd3ab8ac9bc43d9ac80fb8aa211d188ea0e..d8e1f76420f0d54085817dcd1af252aa58e43ebb 100644
--- a/lib/theme/CodeBlock/WordWrapButton/index.js
+++ b/lib/theme/CodeBlock/WordWrapButton/index.js
@@ -25,6 +25,7 @@ export default function WordWrapButton({className, onClick, isEnabled}) {
isEnabled && styles.wordWrapButtonEnabled,
)}
aria-label={title}
+ aria-pressed={isEnabled}
title={title}>
<svg
className={styles.wordWrapButtonIcon}

0 comments on commit d018a38

Please sign in to comment.