fix(chat): restructure chat messages

Signed-off-by: Joshua Irmer <irmer@gonicus.de>
This commit is contained in:
Joshua Irmer
2025-02-25 15:59:45 +01:00
committed by Calinteodor
parent cfbdbd4783
commit 816e991ae5
2 changed files with 33 additions and 17 deletions

View File

@@ -15,6 +15,11 @@ interface IProps {
*/
gifEnabled: boolean;
/**
* Message decoration for screen reader.
*/
screenReaderHelpText?: string;
/**
* The body of the message.
*/
@@ -91,10 +96,18 @@ class Message extends Component<IProps> {
* @returns {ReactElement}
*/
render() {
const { screenReaderHelpText } = this.props;
return (
<>
<p>
{ screenReaderHelpText && (
<span className = 'sr-only'>
{screenReaderHelpText}
</span>
) }
{ this._processMessage() }
</>
</p>
);
}
}