Skip to content

Commit

Permalink
fix: add aria hidden attribute to style tag (#703)
Browse files Browse the repository at this point in the history
  • Loading branch information
froston committed May 28, 2021
1 parent 36e03d6 commit d60c2b7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/index.js
Expand Up @@ -780,7 +780,7 @@ class ReactTooltip extends React.Component {
.join(' ');

if (html) {
const htmlContent = `${content}\n<style>${style}</style>`;
const htmlContent = `${content}\n<style aria-hidden="true">${style}</style>`;

return (
<Wrapper
Expand All @@ -801,7 +801,10 @@ class ReactTooltip extends React.Component {
ref={ref => (this.tooltipRef = ref)}
data-id="tooltip"
>
<style dangerouslySetInnerHTML={{ __html: style }} />
<style
dangerouslySetInnerHTML={{ __html: style }}
aria-hidden="true"
/>
{content}
</Wrapper>
);
Expand Down

0 comments on commit d60c2b7

Please sign in to comment.