cmc/cleberg.net

My personal web garden & blog.

clone: git clone https://gitbay.org/cmc/cleberg.net.git

261f4223e1b9b51d7c27652cec3e3b574599c664

unsigned

author: Christian Cleberg <hello@cleberg.net> · 2024-02-03T23:35:25Z

add accessibility features
 templates/base.html | 2 +-
 templates/page.html | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/templates/base.html b/templates/base.html
index c075a42..1c9c40d 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -26,7 +26,7 @@
 	{% block extra_head %}{% endblock extra_head %}
 </head>
 <body>
-	<nav class="site-nav">
+	<nav class="site-nav" aria-label="site-nav" role="navigation">
 		<ul>
 			<li><a href="/">Home</a></li>
 			<li><a href="/blog/">Blog</a></li>
diff --git a/templates/page.html b/templates/page.html
index b759184..c44e8a0 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -16,7 +16,7 @@
 {% if page.toc %}
     <details open>
         <summary>Table of Contents</summary>
-        <nav class="page-nav">
+        <nav class="page-nav" aria-label="page-nav" role="navigation">
             <ul>
             {% for h1 in page.toc %}
                 <li>
@@ -38,5 +38,7 @@
 {% endif %}
 </section>
 
+<article role="article">
 {{ page.content | safe }}
+</article>
 {% endblock content %}