Skip to content

Commit a8ff2ff

Browse files
JuliaKirschenheuterszaimen
authored andcommitted
Place <h1> into main content
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
1 parent a577625 commit a8ff2ff

File tree

3 files changed

+29
-26
lines changed

3 files changed

+29
-26
lines changed

core/templates/layout.guest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,14 @@
3535
<?php if ($_['bodyid'] === 'body-login'): ?>
3636
<header role="banner">
3737
<div id="header">
38-
<div class="logo">
39-
<h1 class="hidden-visually">
40-
<?php p($theme->getName()); ?>
41-
</h1>
42-
</div>
38+
<div class="logo"></div>
4339
</div>
4440
</header>
4541
<?php endif; ?>
4642
<main>
43+
<h1 class="hidden-visually">
44+
<?php p($theme->getName()); ?>
45+
</h1>
4746
<?php print_unescaped($_['content']); ?>
4847
</main>
4948
</div>

core/templates/layout.public.php

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,19 @@
3838

3939
<header id="header">
4040
<div class="header-left">
41-
<span id="nextcloud">
42-
<div class="logo logo-icon svg"></div>
43-
<h1 class="header-appname">
44-
<?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
45-
<?php p($template->getHeaderTitle()); ?>
46-
<?php } else { ?>
47-
<?php p($theme->getName()); ?>
48-
<?php } ?>
49-
</h1>
50-
<?php if (isset($template) && $template->getHeaderDetails() !== '') { ?>
41+
<div class="logo logo-icon svg"></div>
42+
<span id="nextcloud" class="header-appname">
43+
<?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
44+
<?php p($template->getHeaderTitle()); ?>
45+
<?php } else { ?>
46+
<?php p($theme->getName()); ?>
47+
<?php } ?>
48+
</span>
49+
<?php if (isset($template) && $template->getHeaderDetails() !== '') { ?>
5150
<div class="header-shared-by">
5251
<?php p($template->getHeaderDetails()); ?>
5352
</div>
54-
<?php } ?>
55-
</span>
53+
<?php } ?>
5654
</div>
5755

5856
<div class="header-right">
@@ -87,9 +85,16 @@
8785
} ?>
8886
</div>
8987
</header>
90-
<div id="content" class="app-<?php p($_['appid']) ?>" role="main">
88+
<main id="content" class="app-<?php p($_['appid']) ?>">
89+
<h1 class="hidden-visually">
90+
<?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
91+
<?php p($template->getHeaderTitle()); ?>
92+
<?php } else { ?>
93+
<?php p($theme->getName()); ?>
94+
<?php } ?>
95+
</h1>
9196
<?php print_unescaped($_['content']); ?>
92-
</div>
97+
</main>
9398
<?php if (isset($template) && $template->getFooterVisible()) { ?>
9499
<footer>
95100
<p><?php print_unescaped($theme->getLongFooter()); ?></p>

core/templates/layout.user.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,7 @@
6060
<div class="header-left">
6161
<a href="<?php print_unescaped($_['logoUrl'] ?: link_to('', 'index.php')); ?>"
6262
id="nextcloud">
63-
<div class="logo logo-icon">
64-
<h1 class="hidden-visually">
65-
<?php p($l->t('%s\'s homepage', [$theme->getName()])); ?>
66-
</h1>
67-
</div>
63+
<div class="logo logo-icon"></div>
6864
</a>
6965

7066
<nav id="header-left__appmenu"></nav>
@@ -133,9 +129,12 @@
133129
<input class="confirm" value="<?php p($l->t('Confirm')); ?>" type="submit">
134130
</form>
135131

136-
<div id="content" class="app-<?php p($_['appid']) ?>" role="main">
132+
<main id="content" class="app-<?php p($_['appid']) ?>">
133+
<h1 class="hidden-visually">
134+
<?php p($l->t('%s\'s homepage', [$theme->getName()])); ?>
135+
</h1>
137136
<?php print_unescaped($_['content']); ?>
138-
</div>
137+
</main>
139138
<div id="profiler-toolbar"></div>
140139
</body>
141140
</html>

0 commit comments

Comments
 (0)