Skip to content

Commit 7c264d8

Browse files
frontend: PluginSettings stories: fix heading hierarchy
1 parent 46be107 commit 7c264d8

10 files changed

+146
-171
lines changed

frontend/src/components/App/PluginSettings/PluginSettings.stories.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ export default {
2424
component: PluginSettingsPure,
2525
decorators: [
2626
Story => (
27-
<div>
28-
<h1 style={{ position: 'absolute', left: '-10000px' }}>Plugin Settings Test Page</h1>
27+
<div aria-label="Plugin Settings Test Page">
2928
<Story />
3029
</div>
3130
),

frontend/src/components/App/PluginSettings/PluginSettings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export function PluginSettingsPure(props: PluginSettingsPureProps) {
237237

238238
return (
239239
<>
240-
<Typography variant="subtitle1">
240+
<Typography variant="subtitle1" component="div">
241241
<HeadlampLink
242242
routeName={'pluginDetails'}
243243
params={{ name: plugin.name, type: plugin.type || 'shipped' }}

frontend/src/components/App/PluginSettings/__snapshots__/PluginSettings.DefaultSaveEnable.stories.storyshot

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
<body>
22
<div>
3-
<div>
4-
<h1
5-
style="position: absolute; left: -10000px;"
6-
>
7-
Plugin Settings Test Page
8-
</h1>
3+
<div
4+
aria-label="Plugin Settings Test Page"
5+
>
96
<div
107
class="MuiBox-root css-j1fy4m"
118
>
@@ -390,7 +387,7 @@
390387
<td
391388
class="MuiTableCell-root MuiTableCell-alignLeft MuiTableCell-sizeMedium css-16gecr3-MuiTableCell-root"
392389
>
393-
<h6
390+
<div
394391
class="MuiTypography-root MuiTypography-subtitle1 css-1t3dwd5-MuiTypography-root"
395392
>
396393
<a
@@ -399,7 +396,7 @@
399396
>
400397
plugin a 0
401398
</a>
402-
</h6>
399+
</div>
403400
<span
404401
class="MuiTypography-root MuiTypography-caption css-1yjsbnr-MuiTypography-root"
405402
/>
@@ -453,7 +450,7 @@
453450
<td
454451
class="MuiTableCell-root MuiTableCell-alignLeft MuiTableCell-sizeMedium css-16gecr3-MuiTableCell-root"
455452
>
456-
<h6
453+
<div
457454
class="MuiTypography-root MuiTypography-subtitle1 css-1t3dwd5-MuiTypography-root"
458455
>
459456
<a
@@ -462,7 +459,7 @@
462459
>
463460
plugin a 1
464461
</a>
465-
</h6>
462+
</div>
466463
<span
467464
class="MuiTypography-root MuiTypography-caption css-1yjsbnr-MuiTypography-root"
468465
/>
@@ -518,7 +515,7 @@
518515
<td
519516
class="MuiTableCell-root MuiTableCell-alignLeft MuiTableCell-sizeMedium css-16gecr3-MuiTableCell-root"
520517
>
521-
<h6
518+
<div
522519
class="MuiTypography-root MuiTypography-subtitle1 css-1t3dwd5-MuiTypography-root"
523520
>
524521
<a
@@ -527,7 +524,7 @@
527524
>
528525
plugin a 2
529526
</a>
530-
</h6>
527+
</div>
531528
<span
532529
class="MuiTypography-root MuiTypography-caption css-1yjsbnr-MuiTypography-root"
533530
/>
@@ -581,7 +578,7 @@
581578
<td
582579
class="MuiTableCell-root MuiTableCell-alignLeft MuiTableCell-sizeMedium css-16gecr3-MuiTableCell-root"
583580
>
584-
<h6
581+
<div
585582
class="MuiTypography-root MuiTypography-subtitle1 css-1t3dwd5-MuiTypography-root"
586583
>
587584
<a
@@ -590,7 +587,7 @@
590587
>
591588
plugin a 3
592589
</a>
593-
</h6>
590+
</div>
594591
<span
595592
class="MuiTypography-root MuiTypography-caption css-1yjsbnr-MuiTypography-root"
596593
/>
@@ -646,7 +643,7 @@
646643
<td
647644
class="MuiTableCell-root MuiTableCell-alignLeft MuiTableCell-sizeMedium css-16gecr3-MuiTableCell-root"
648645
>
649-
<h6
646+
<div
650647
class="MuiTypography-root MuiTypography-subtitle1 css-1t3dwd5-MuiTypography-root"
651648
>
652649
<a
@@ -655,7 +652,7 @@
655652
>
656653
plugin a 4
657654
</a>
658-
</h6>
655+
</div>
659656
<span
660657
class="MuiTypography-root MuiTypography-caption css-1yjsbnr-MuiTypography-root"
661658
/>

frontend/src/components/App/PluginSettings/__snapshots__/PluginSettings.Empty.stories.storyshot

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
<body>
22
<div>
3-
<div>
4-
<h1
5-
style="position: absolute; left: -10000px;"
6-
>
7-
Plugin Settings Test Page
8-
</h1>
3+
<div
4+
aria-label="Plugin Settings Test Page"
5+
>
96
<div
107
class="MuiBox-root css-j1fy4m"
118
>

frontend/src/components/App/PluginSettings/__snapshots__/PluginSettings.EmptyHomepageItems.stories.storyshot

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
<body>
22
<div>
3-
<div>
4-
<h1
5-
style="position: absolute; left: -10000px;"
6-
>
7-
Plugin Settings Test Page
8-
</h1>
3+
<div
4+
aria-label="Plugin Settings Test Page"
5+
>
96
<div
107
class="MuiBox-root css-j1fy4m"
118
>
@@ -390,7 +387,7 @@
390387
<td
391388
class="MuiTableCell-root MuiTableCell-alignLeft MuiTableCell-sizeMedium css-16gecr3-MuiTableCell-root"
392389
>
393-
<h6
390+
<div
394391
class="MuiTypography-root MuiTypography-subtitle1 css-1t3dwd5-MuiTypography-root"
395392
>
396393
<a
@@ -399,7 +396,7 @@
399396
>
400397
plugin a 0
401398
</a>
402-
</h6>
399+
</div>
403400
<span
404401
class="MuiTypography-root MuiTypography-caption css-1yjsbnr-MuiTypography-root"
405402
/>
@@ -453,7 +450,7 @@
453450
<td
454451
class="MuiTableCell-root MuiTableCell-alignLeft MuiTableCell-sizeMedium css-16gecr3-MuiTableCell-root"
455452
>
456-
<h6
453+
<div
457454
class="MuiTypography-root MuiTypography-subtitle1 css-1t3dwd5-MuiTypography-root"
458455
>
459456
<a
@@ -462,7 +459,7 @@
462459
>
463460
plugin a 1
464461
</a>
465-
</h6>
462+
</div>
466463
<span
467464
class="MuiTypography-root MuiTypography-caption css-1yjsbnr-MuiTypography-root"
468465
/>
@@ -518,7 +515,7 @@
518515
<td
519516
class="MuiTableCell-root MuiTableCell-alignLeft MuiTableCell-sizeMedium css-16gecr3-MuiTableCell-root"
520517
>
521-
<h6
518+
<div
522519
class="MuiTypography-root MuiTypography-subtitle1 css-1t3dwd5-MuiTypography-root"
523520
>
524521
<a
@@ -527,7 +524,7 @@
527524
>
528525
plugin a 2
529526
</a>
530-
</h6>
527+
</div>
531528
<span
532529
class="MuiTypography-root MuiTypography-caption css-1yjsbnr-MuiTypography-root"
533530
/>
@@ -581,7 +578,7 @@
581578
<td
582579
class="MuiTableCell-root MuiTableCell-alignLeft MuiTableCell-sizeMedium css-16gecr3-MuiTableCell-root"
583580
>
584-
<h6
581+
<div
585582
class="MuiTypography-root MuiTypography-subtitle1 css-1t3dwd5-MuiTypography-root"
586583
>
587584
<a
@@ -590,7 +587,7 @@
590587
>
591588
plugin a 3
592589
</a>
593-
</h6>
590+
</div>
594591
<span
595592
class="MuiTypography-root MuiTypography-caption css-1yjsbnr-MuiTypography-root"
596593
/>
@@ -646,7 +643,7 @@
646643
<td
647644
class="MuiTableCell-root MuiTableCell-alignLeft MuiTableCell-sizeMedium css-16gecr3-MuiTableCell-root"
648645
>
649-
<h6
646+
<div
650647
class="MuiTypography-root MuiTypography-subtitle1 css-1t3dwd5-MuiTypography-root"
651648
>
652649
<a
@@ -655,7 +652,7 @@
655652
>
656653
plugin a 4
657654
</a>
658-
</h6>
655+
</div>
659656
<span
660657
class="MuiTypography-root MuiTypography-caption css-1yjsbnr-MuiTypography-root"
661658
/>

frontend/src/components/App/PluginSettings/__snapshots__/PluginSettings.FewItems.stories.storyshot

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
<body>
22
<div>
3-
<div>
4-
<h1
5-
style="position: absolute; left: -10000px;"
6-
>
7-
Plugin Settings Test Page
8-
</h1>
3+
<div
4+
aria-label="Plugin Settings Test Page"
5+
>
96
<div
107
class="MuiBox-root css-j1fy4m"
118
>
@@ -390,7 +387,7 @@
390387
<td
391388
class="MuiTableCell-root MuiTableCell-alignLeft MuiTableCell-sizeMedium css-16gecr3-MuiTableCell-root"
392389
>
393-
<h6
390+
<div
394391
class="MuiTypography-root MuiTypography-subtitle1 css-1t3dwd5-MuiTypography-root"
395392
>
396393
<a
@@ -399,7 +396,7 @@
399396
>
400397
plugin a 0
401398
</a>
402-
</h6>
399+
</div>
403400
<span
404401
class="MuiTypography-root MuiTypography-caption css-1yjsbnr-MuiTypography-root"
405402
/>
@@ -453,7 +450,7 @@
453450
<td
454451
class="MuiTableCell-root MuiTableCell-alignLeft MuiTableCell-sizeMedium css-16gecr3-MuiTableCell-root"
455452
>
456-
<h6
453+
<div
457454
class="MuiTypography-root MuiTypography-subtitle1 css-1t3dwd5-MuiTypography-root"
458455
>
459456
<a
@@ -462,7 +459,7 @@
462459
>
463460
plugin a 1
464461
</a>
465-
</h6>
462+
</div>
466463
<span
467464
class="MuiTypography-root MuiTypography-caption css-1yjsbnr-MuiTypography-root"
468465
/>
@@ -518,7 +515,7 @@
518515
<td
519516
class="MuiTableCell-root MuiTableCell-alignLeft MuiTableCell-sizeMedium css-16gecr3-MuiTableCell-root"
520517
>
521-
<h6
518+
<div
522519
class="MuiTypography-root MuiTypography-subtitle1 css-1t3dwd5-MuiTypography-root"
523520
>
524521
<a
@@ -527,7 +524,7 @@
527524
>
528525
plugin a 2
529526
</a>
530-
</h6>
527+
</div>
531528
<span
532529
class="MuiTypography-root MuiTypography-caption css-1yjsbnr-MuiTypography-root"
533530
/>
@@ -581,7 +578,7 @@
581578
<td
582579
class="MuiTableCell-root MuiTableCell-alignLeft MuiTableCell-sizeMedium css-16gecr3-MuiTableCell-root"
583580
>
584-
<h6
581+
<div
585582
class="MuiTypography-root MuiTypography-subtitle1 css-1t3dwd5-MuiTypography-root"
586583
>
587584
<a
@@ -590,7 +587,7 @@
590587
>
591588
plugin a 3
592589
</a>
593-
</h6>
590+
</div>
594591
<span
595592
class="MuiTypography-root MuiTypography-caption css-1yjsbnr-MuiTypography-root"
596593
/>
@@ -646,7 +643,7 @@
646643
<td
647644
class="MuiTableCell-root MuiTableCell-alignLeft MuiTableCell-sizeMedium css-16gecr3-MuiTableCell-root"
648645
>
649-
<h6
646+
<div
650647
class="MuiTypography-root MuiTypography-subtitle1 css-1t3dwd5-MuiTypography-root"
651648
>
652649
<a
@@ -655,7 +652,7 @@
655652
>
656653
plugin a 4
657654
</a>
658-
</h6>
655+
</div>
659656
<span
660657
class="MuiTypography-root MuiTypography-caption css-1yjsbnr-MuiTypography-root"
661658
/>

0 commit comments

Comments
 (0)