Skip to content

Commit

Permalink
fix(a11y): Add visually hidden context to "Restart Application" button
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Apr 2, 2024
1 parent 4dfa9a2 commit 2324302
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions editor.planx.uk/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { styled, Theme } from "@mui/material/styles";
import MuiToolbar from "@mui/material/Toolbar";
import Typography from "@mui/material/Typography";
import useMediaQuery from "@mui/material/useMediaQuery";
import { visuallyHidden } from "@mui/utils";
import { ComponentType as TYPES } from "@opensystemslab/planx-core/types";
import { clearLocalFlow } from "lib/local";
import { capitalize } from "lodash";
Expand Down Expand Up @@ -359,7 +360,9 @@ const PublicToolbar: React.FC<{
onClick={openConfirmationDialog}
aria-label="Restart Application"
size="large"
aria-describedby="restart-application-description"
>
<Typography id="restart-application-description" style={visuallyHidden}>Open a dialog with the option to restart your application. If you chose to restart your application, this will delete your previous answers</Typography>
<Reset color="secondary" />
</IconButton>
)}
Expand Down

0 comments on commit 2324302

Please sign in to comment.