Author: Manos Pitsidianakis [manos@pitsidianak.is]
Hash: 4bc606236f97de103749731abaec61dad3e91aca
Timestamp: Fri, 26 Jan 2024 13:50:31 +0000 (7 months ago)

+12 -12 +/-9 browse
web: wrap names with <bdi> to support bidi user names
web: wrap names with <bdi> to support bidi user names

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1diff --git a/web/src/templates/header.html b/web/src/templates/header.html
2index 6d2ab7d..d4ad75e 100644
3--- a/web/src/templates/header.html
4+++ b/web/src/templates/header.html
5 @@ -10,9 +10,9 @@
6 <body>
7 <main class="layout">
8 <div class="header">
9- <h1>{{ site_title }}</h1>
10+ <h1><bdi>{{ site_title }}</bdi></h1>
11 {% if site_subtitle %}
12- <p class="site-subtitle">{{ site_subtitle|safe }}</p>
13+ <p class="site-subtitle"><bdi>{{ site_subtitle|safe }}</bdi></p>
14 {% endif %}
15 {% include "menu.html" %}
16 <div class="page-header">
17 @@ -20,7 +20,7 @@
18 <ol id="breadcrumb-menu" role="menu" aria-label="Breadcrumb menu">{% for crumb in crumbs %}<li class="crumb" aria-describedby="bread_{{ loop.index }}">{% if loop.last %}<span role="menuitem" id="bread_{{ loop.index }}" aria-current="page" title="current page">{{ crumb.label }}</span>{% else %}<a role="menuitem" id="bread_{{ loop.index }}" href="{{ urlize(crumb.url) }}" tabindex="0">{{ crumb.label }}</a>{% endif %}</li>{% endfor %}</ol>
19 </nav>{% endif %}
20 {% if page_title %}
21- <h2 class="page-title">{{ page_title }}</h2>
22+ <h2 class="page-title"><bdi>{{ page_title }}</bdi></h2>
23 {% endif %}
24 {% if messages %}
25 <ul class="messagelist">
26 diff --git a/web/src/templates/index.html b/web/src/templates/index.html
27index 48fa708..c2a6c97 100644
28--- a/web/src/templates/index.html
29+++ b/web/src/templates/index.html
30 @@ -3,7 +3,7 @@
31 <div class="body">
32 <ul>
33 {% for l in lists %}
34- <li><a href="{{ list_path(l.list.id) }}">{{ l.list.name }}</a></li>
35+ <li><a href="{{ list_path(l.list.id) }}"><bdi>{{ l.list.name }}</bdi></a></li>
36 {% endfor %}
37 </ul>
38 </div>
39 diff --git a/web/src/templates/lists.html b/web/src/templates/lists.html
40index 25656b1..5f1a6d8 100644
41--- a/web/src/templates/lists.html
42+++ b/web/src/templates/lists.html
43 @@ -4,7 +4,7 @@
44 <div class="entry">
45 <dl class="lists" aria-label="list of mailing lists">
46 {% for l in lists %}
47- <dt aria-label="mailing list name"><a href="{{ list_path(l.list.id) }}">{{ l.list.name }}</a></dt>
48+ <dt aria-label="mailing list name"><a href="{{ list_path(l.list.id) }}"><bdi>{{ l.list.name }}</bdi></a></dt>
49 <dd><span aria-label="mailing list description"{% if not l.list.description %} class="no-description"{% endif %}>{{ l.list.description if l.list.description else "<p>no description</p>"|safe }}</span><span class="list-posts-dates tabular-nums">{{ l.posts|length }} post{{ l.posts|length|pluralize("","s") }}{% if l.newest %} | <time datetime="{{ l.newest }}">{{ l.newest }}</time>{% endif %}</span>{% if l.list.topics|length > 0 %}<span class="list-topics"><span>Topics:</span>&nbsp;{{ l.list.topics() }}</span>{% endif %}</dd>
50 {% endfor %}
51 </dl>
52 diff --git a/web/src/templates/lists/entry.html b/web/src/templates/lists/entry.html
53index 7aa07a7..6920257 100644
54--- a/web/src/templates/lists/entry.html
55+++ b/web/src/templates/lists/entry.html
56 @@ -7,7 +7,7 @@
57 </tr>
58 <tr>
59 <th scope="row">From:</th>
60- <td>{{ post.address }}</td>
61+ <td><bdi>{{ post.address }}</bdi></td>
62 </tr>
63 <tr>
64 <th scope="row">Date:</th>
65 diff --git a/web/src/templates/lists/list.html b/web/src/templates/lists/list.html
66index 7eb868e..18fe31a 100644
67--- a/web/src/templates/lists/list.html
68+++ b/web/src/templates/lists/list.html
69 @@ -103,7 +103,7 @@
70 {% for post in posts %}
71 <div class="entry" role="listitem" aria-labelledby="post_link_{{ loop.index }}">
72 <span class="subject"><a id="post_link_{{ loop.index }}" href="{{ list_post_path(list.id, post.message_id) }}">{{ post.subject }}</a>&nbsp;<span class="metadata replies" title="reply count">{{ post.replies }} repl{{ post.replies|pluralize("y","ies") }}</span></span>
73- <span class="metadata"><span aria-hidden="true">👤&nbsp;</span><span class="from" title="post author">{{ post.address }}</span><span aria-hidden="true"> 📆&nbsp;</span><span class="date" title="post date">{{ post.datetime }}</span></span>
74+ <span class="metadata"><span aria-hidden="true">👤&nbsp;</span><span class="from" title="post author"><bdi>{{ post.address }}</bdi></span><span aria-hidden="true"> 📆&nbsp;</span><span class="date" title="post date">{{ post.datetime }}</span></span>
75 {% if post.replies > 0 %}<span class="metadata"><span aria-hidden="true">&#x1F493;&nbsp;</span><span class="last-active" title="latest thread activity">{{ post.last_active }}</span></span>{% endif %}
76 <span class="metadata"><span aria-hidden="true">🪪 </span><span class="message-id" title="e-mail Message-ID">{{ post.message_id }}</span></span>
77 </div>
78 diff --git a/web/src/templates/menu.html b/web/src/templates/menu.html
79index d0e8392..ea9b627 100644
80--- a/web/src/templates/menu.html
81+++ b/web/src/templates/menu.html
82 @@ -3,7 +3,7 @@
83 <li><a role="menuitem" href="{{ urlize("") }}/">Index</a></li>
84 <li><a role="menuitem" href="{{ help_path() }}">Help&nbsp;&amp; Documentation</a></li>
85 {% if current_user %}
86- <li class="push">Settings: <a role="menuitem" href="{{ settings_path() }}" title="User settings">{{ current_user.address }}</a></li>
87+ <li class="push">Settings: <a role="menuitem" href="{{ settings_path() }}" title="User settings"><bdi>{{ current_user.address }}</bdi></a></li>
88 {% else %}
89 <li class="push"><a role="menuitem" href="{{ login_path() }}" title="login with one time password using your SSH key">Login with SSH OTP</a></li>
90 {% endif %}
91 diff --git a/web/src/templates/settings.html b/web/src/templates/settings.html
92index c506345..1a6bdc0 100644
93--- a/web/src/templates/settings.html
94+++ b/web/src/templates/settings.html
95 @@ -3,7 +3,7 @@
96 {{ heading(3,"Your account","account") }}
97 <div class="entries">
98 <div class="entry">
99- <span>Display name: <span class="value{% if not user.name %} empty{% endif %}">{{ user.name if user.name else "None" }}</span></span>
100+ <span>Display name: <span class="value{% if not user.name %} empty{% endif %}"><bdi>{{ user.name if user.name else "None" }}</bdi></span></span>
101 </div>
102 <div class="entry">
103 <span>Address: <span class="value">{{ user.address }}</span></span>
104 diff --git a/web/src/templates/settings_subscription.html b/web/src/templates/settings_subscription.html
105index abe7289..e36d187 100644
106--- a/web/src/templates/settings_subscription.html
107+++ b/web/src/templates/settings_subscription.html
108 @@ -2,12 +2,12 @@
109 <div class="body body-grid">
110 {{ heading(3, "Your subscription to <a href=\"" ~ list_path(list.id) ~ "\">" ~ list.id ~ "</a>.","subscription") }}
111 <address>
112- {{ list.name }} <a href="mailto:{{ list.address | safe }}"><code>{{ list.address }}</code></a>
113+ <bdi>{{ list.name }}</bdi> <a href="mailto:{{ list.address | safe }}"><code>{{ list.address }}</code></a>
114 </address>
115 {% if list.is_description_html_safe %}
116 {{ list.description|safe}}
117 {% else %}
118- <p>{{ list.description }}</p>
119+ <p><bdi>{{ list.description }}</bdi></p>
120 {% endif %}
121 {% if list.archive_url %}
122 <p><a href="{{ list.archive_url }}">{{ list.archive_url }}</a></p>
123 diff --git a/web/src/templates/topics.html b/web/src/templates/topics.html
124index a34216c..ec5b8d3 100644
125--- a/web/src/templates/topics.html
126+++ b/web/src/templates/topics.html
127 @@ -1,6 +1,6 @@
128 {% include "header.html" %}
129 <div class="body">
130- <p style="margin-block-end: 1rem;">Results for <em>{{ term }}</em></p>
131+ <p style="margin-block-end: 1rem;">Results for <bdi><em>{{ term }}</em></bdi></p>
132 <div class="entry">
133 <dl class="lists" aria-label="list of mailing lists">
134 {% for list in results %}