Skip to content

Commit 6aada3e

Browse files
committed
Replace divs with proper html5 landmarks.
div.header -> header.header (class kept for css) div.subnav -> nav.subnav div.footer -> footer.footer Also since there are now two navs (primary on the left and the subnav with prev/next/index), all nav's get an aria-label to distinguish the subnav from the main nav.
1 parent aadbb85 commit 6aada3e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

website/www/_templates/layout.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
</head>
7373
<body>
7474
<div id="skiplink"><a href="#main">Skip to main content</a></div>
75-
<div class="header"><div class="label">Roundup</div>
75+
<header class="header"><div class="label">Roundup</div>
7676
{%- if pagename != "search" %}
7777
<div id="searchbox" style="display: none">
7878
<form class="search" action="{{ pathto('search') }}" method="get">
@@ -84,16 +84,16 @@
8484
</form>
8585
</div>
8686
{%- endif %}
87-
</div>
87+
</header>
8888
<div class="navigation">
89-
<nav>
89+
<nav aria-label="primary navigation">
9090
<div class="menu">
9191
{{ toctree() }}
9292
</div>
9393
</nav>
9494
</div>
9595
<div class="content">
96-
<div id="subnav">
96+
<nav id="subnav" aria-label="sub navigation">
9797
{%- if prev %}
9898
<a title="{{ prev.title|striptags }}" href="{{ prev.link|e }}">
9999
Prev</a>
@@ -104,13 +104,13 @@
104104
{%- endif %}
105105
<a title="{{ _('Index') }}" href="{{ pathto('genindex') }}">
106106
Index</a>
107-
</div>
107+
</nav>
108108
<main id="main" tabindex="-1">
109109
{% block body %} {% endblock %}
110110
</main>
111111
</div>
112112
{%- block footer %}
113-
<div class="footer">
113+
<footer class="footer">
114114
<div>
115115
{%- if show_source and has_source and sourcename %}
116116
<span class="source">[<a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow">{{ _('page source') }}</a>]</span>
@@ -127,7 +127,7 @@
127127
{%- endif %}
128128
<span>Hosted by <a href="https://sourceforge.net"><img src="https://sflogo.sourceforge.net/sflogo.php?group_id=31577&amp;type=1" width="88" height="31" alt="SourceForge.net Logo" /></a></span>
129129
</div>
130-
</div>
130+
</footer>
131131
{%- endblock %}
132132
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
133133
<script>

0 commit comments

Comments
 (0)