Skip to content

Commit 46bca74

Browse files
committed
frontend: Fix new project heading a11y issue
1 parent 4868c46 commit 46bca74

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

frontend/src/components/project/NewProjectPopup.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function ProjectTypeButton({
8888
>
8989
<Box sx={{ width: '52px', height: '52px', alignSelf: 'center' }}>{icon}</Box>
9090
<Box>
91-
<Typography variant="h6" sx={{ display: 'flex' }}>
91+
<Typography variant="h6" component="span" sx={{ display: 'flex' }}>
9292
{title}
9393
</Typography>
9494
<Typography variant="body2" color="text.secondary">
@@ -346,7 +346,9 @@ export function NewProjectPopup({ open, onClose }: { open: boolean; onClose: ()
346346
<Dialog open={open} maxWidth={false} onClose={onClose}>
347347
{projectStep === undefined && (
348348
<>
349-
<DialogTitle sx={{ display: 'flex' }}>{t('Create a Project')}</DialogTitle>
349+
<DialogTitle component="h1" sx={{ display: 'flex' }}>
350+
{t('Create a Project')}
351+
</DialogTitle>
350352
<DialogContent sx={{ maxWidth: '540px' }}>
351353
<Typography variant="body2" color="text.secondary" sx={{ mb: 3 }}>
352354
<Trans>

frontend/src/components/project/__snapshots__/NewProjectPopup.Default.stories.storyshot

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiDialog-paper MuiDialog-paperScrollPaper MuiDialog-paperWidthFalse css-v61m47-MuiPaper-root-MuiDialog-paper"
3131
role="dialog"
3232
>
33-
<h2
33+
<h1
3434
class="MuiTypography-root MuiTypography-h6 MuiDialogTitle-root css-q5kqw8-MuiTypography-root-MuiDialogTitle-root"
3535
id=":mock-test-id:"
3636
>
3737
Create a Project
38-
</h2>
38+
</h1>
3939
<div
4040
class="MuiDialogContent-root css-15ohtq7-MuiDialogContent-root"
4141
>
@@ -58,11 +58,11 @@
5858
<div
5959
class="MuiBox-root css-0"
6060
>
61-
<h6
61+
<span
6262
class="MuiTypography-root MuiTypography-h6 css-16yif3g-MuiTypography-root"
6363
>
6464
New Project
65-
</h6>
65+
</span>
6666
<p
6767
class="MuiTypography-root MuiTypography-body2 css-11zj6ou-MuiTypography-root"
6868
>
@@ -84,11 +84,11 @@
8484
<div
8585
class="MuiBox-root css-0"
8686
>
87-
<h6
87+
<span
8888
class="MuiTypography-root MuiTypography-h6 css-16yif3g-MuiTypography-root"
8989
>
9090
New Project from YAML
91-
</h6>
91+
</span>
9292
<p
9393
class="MuiTypography-root MuiTypography-body2 css-11zj6ou-MuiTypography-root"
9494
>

frontend/src/components/project/__snapshots__/NewProjectPopup.WithExistingProjects.stories.storyshot

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
class="MuiPaper-root MuiPaper-outlined MuiPaper-rounded MuiDialog-paper MuiDialog-paperScrollPaper MuiDialog-paperWidthFalse css-v61m47-MuiPaper-root-MuiDialog-paper"
3131
role="dialog"
3232
>
33-
<h2
33+
<h1
3434
class="MuiTypography-root MuiTypography-h6 MuiDialogTitle-root css-q5kqw8-MuiTypography-root-MuiDialogTitle-root"
3535
id=":mock-test-id:"
3636
>
3737
Create a Project
38-
</h2>
38+
</h1>
3939
<div
4040
class="MuiDialogContent-root css-15ohtq7-MuiDialogContent-root"
4141
>
@@ -58,11 +58,11 @@
5858
<div
5959
class="MuiBox-root css-0"
6060
>
61-
<h6
61+
<span
6262
class="MuiTypography-root MuiTypography-h6 css-16yif3g-MuiTypography-root"
6363
>
6464
New Project
65-
</h6>
65+
</span>
6666
<p
6767
class="MuiTypography-root MuiTypography-body2 css-11zj6ou-MuiTypography-root"
6868
>
@@ -84,11 +84,11 @@
8484
<div
8585
class="MuiBox-root css-0"
8686
>
87-
<h6
87+
<span
8888
class="MuiTypography-root MuiTypography-h6 css-16yif3g-MuiTypography-root"
8989
>
9090
New Project from YAML
91-
</h6>
91+
</span>
9292
<p
9393
class="MuiTypography-root MuiTypography-body2 css-11zj6ou-MuiTypography-root"
9494
>

0 commit comments

Comments
 (0)