Skip to content

Commit ff9a4be

Browse files
committed
Remove screen reader text
1 parent 8ddccc9 commit ff9a4be

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

packages/component/src/Attachment/TextContent.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,21 @@
55

66
import classNames from 'classnames';
77
import PropTypes from 'prop-types';
8-
import React, { useMemo } from 'react';
8+
import React from 'react';
99

10-
import ScreenReaderText from '../ScreenReaderText';
1110
import useRenderMarkdownAsHTML from '../hooks/useRenderMarkdownAsHTML';
12-
import useStripMarkdown from '../hooks/internal/useStripMarkdown';
1311
import useStyleSet from '../hooks/useStyleSet';
1412

1513
const TextContent = ({ contentType, text }) => {
1614
const [{ textContent: textContentStyleSet }] = useStyleSet();
1715
const renderMarkdownAsHTML = useRenderMarkdownAsHTML();
1816
const contentTypeMarkdown = contentType === 'text/markdown';
19-
const textAlt = useStripMarkdown(contentTypeMarkdown && text);
2017

2118
return contentTypeMarkdown && renderMarkdownAsHTML ? (
22-
<React.Fragment>
23-
<ScreenReaderText text={textAlt} />
24-
<div
25-
aria-hidden={true}
26-
className={classNames('markdown', textContentStyleSet + '')}
27-
dangerouslySetInnerHTML={{ __html: renderMarkdownAsHTML(text || '') }}
28-
/>
29-
</React.Fragment>
19+
<div
20+
className={classNames('markdown', textContentStyleSet + '')}
21+
dangerouslySetInnerHTML={{ __html: renderMarkdownAsHTML(text || '') }}
22+
/>
3023
) : (
3124
(text || '').split('\n').map((line, index) => (
3225
<p className={classNames('plain', textContentStyleSet + '')} key={index}>

0 commit comments

Comments
 (0)