Skip to content

Commit

Permalink
fix(PublicSwitchEnvMessage): remove nested <p/> tags (#4895)
Browse files Browse the repository at this point in the history
  • Loading branch information
karrui authored Sep 19, 2022
1 parent 0a1c9d5 commit 3871ee9
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@ export const PublicSwitchEnvMessage = (): JSX.Element => {
mb="1.5rem"
mt={{ base: '2rem', md: '0' }}
>
{/* Hide the text and replicate it in the aria-label for the button instead,
because without it, the sentence will be read as two separate parts which
is confusing for those using screen readers. */}
{/**
* Hide the text and replicate it in the aria-label for the button instead,
* because without it, the sentence will be read as two separate parts which
* is confusing for those using screen readers.
*/}
<Text>
<Text aria-hidden display="inline">
<Text as="span" aria-hidden display="inline">
You’re using the new FormSG design. If you have trouble
submitting,
</Text>
<Button
variant="link"
my="-0.25rem"
onClick={onOpen}
aria-label="You're using the new FormSG design. If you have trouble submitting, switch to the original one here."
>
Expand Down

0 comments on commit 3871ee9

Please sign in to comment.