Skip to content

Commit d60c2b7

Browse files
authored
fix: add aria hidden attribute to style tag (#703)
1 parent 36e03d6 commit d60c2b7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/index.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ class ReactTooltip extends React.Component {
780780
.join(' ');
781781

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

785785
return (
786786
<Wrapper
@@ -801,7 +801,10 @@ class ReactTooltip extends React.Component {
801801
ref={ref => (this.tooltipRef = ref)}
802802
data-id="tooltip"
803803
>
804-
<style dangerouslySetInnerHTML={{ __html: style }} />
804+
<style
805+
dangerouslySetInnerHTML={{ __html: style }}
806+
aria-hidden="true"
807+
/>
805808
{content}
806809
</Wrapper>
807810
);

0 commit comments

Comments
 (0)