Skip to content

Commit

Permalink
Add aria-hidden flag to svg for textsize util to fix accessibility is…
Browse files Browse the repository at this point in the history
…sue (#2661)

* add aria-hidden flag to svg for textsize util to fix accessibility issue
---------

Co-authored-by: Charlie Brown <[email protected]>
  • Loading branch information
noranda and carbonrobot authored Oct 18, 2023
1 parent bbc1e2a commit c8381aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/many-suns-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"victory-core": patch
"victory": patch
---

Add aria-hidden flag to svg for textsize util to fix accessibility issue
1 change: 1 addition & 0 deletions packages/victory-core/src/victory-util/textsize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ const _getMeasurementContainer = memoize(() => {
element.setAttribute("width", "300");
element.setAttribute("height", "300");
element.setAttribute("viewBox", "0 0 300 300");
element.setAttribute("aria-hidden", "true");

const containerElement = document.createElementNS(
"http://www.w3.org/2000/svg",
Expand Down

1 comment on commit c8381aa

@vercel
Copy link

@vercel vercel bot commented on c8381aa Oct 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.