Skip to content

Commit

Permalink
Fix div-inside-of-p issue in field errors (#1848)
Browse files Browse the repository at this point in the history
fix: make ScreenReaderText a span for semantics
  • Loading branch information
jordankoschei-okta authored Jun 23, 2023
1 parent 7aeaf10 commit 0665558
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/odyssey-react-mui/src/ScreenReaderText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export type ScreenReaderTextProps = {
const style = { ...visuallyHidden };

const ScreenReaderText = ({ children }: ScreenReaderTextProps) => (
<Box sx={style}>{children}</Box>
<Box sx={style} component="span">
{children}
</Box>
);

const MemoizedScreenReaderText = memo(ScreenReaderText);
Expand Down

0 comments on commit 0665558

Please sign in to comment.