summaryrefslogtreecommitdiffstats
path: root/templates/activities/_post.html
diff options
context:
space:
mode:
authorMichael Manfre2022-12-07 11:12:43 -0500
committerGitHub2022-12-07 09:12:43 -0700
commit25b8bf6a2e5cdbf921ca8ba4a994f57c1c859844 (patch)
treed33ed6a8a1d06c42dc197ab43f9beccf8f43e89f /templates/activities/_post.html
parent7413dab0520b68bfb7d96805b44cc3e384113aec (diff)
downloadtakahe-25b8bf6a2e5cdbf921ca8ba4a994f57c1c859844.tar.gz
takahe-25b8bf6a2e5cdbf921ca8ba4a994f57c1c859844.tar.bz2
takahe-25b8bf6a2e5cdbf921ca8ba4a994f57c1c859844.zip
Keyboard navigation
Diffstat (limited to 'templates/activities/_post.html')
-rw-r--r--templates/activities/_post.html30
1 files changed, 15 insertions, 15 deletions
diff --git a/templates/activities/_post.html b/templates/activities/_post.html
index e764747..4e5cb7c 100644
--- a/templates/activities/_post.html
+++ b/templates/activities/_post.html
@@ -1,22 +1,22 @@
{% load static %}
{% load activity_tags %}
-<div class="post {% if reply %}reply{% endif %}" data-takahe-id="{{ post.id }}">
+<div class="post {% if reply %}reply{% endif %}" data-takahe-id="{{ post.id }}" role="article" tabindex="0">
- <a href="{{ post.author.urls.view }}">
+ <a href="{{ post.author.urls.view }}" tabindex="-1">
<img src="{{ post.author.local_icon_url }}" class="icon">
</a>
<time _="on click go url {% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %} then halt">
{% if post.visibility == 0 %}
- <i class="visibility fa-solid fa-earth-oceania" title="Public"></i>
+ <i class="visibility fa-solid fa-earth-oceania" title="Public" aria-label="public"></i>
{% elif post.visibility == 1 %}
- <i class="visibility fa-solid fa-lock-open" title="Unlisted"></i>
+ <i class="visibility fa-solid fa-lock-open" title="Unlisted" aria-label="unlisted"></i>
{% elif post.visibility == 2 %}
- <i class="visibility fa-solid fa-lock" title="Followers Only"></i>
+ <i class="visibility fa-solid fa-lock" title="Followers Only" aria-label="followers only"></i>
{% elif post.visibility == 3 %}
- <i class="visibility fa-solid fa-at" title="Mentioned Only"></i>
+ <i class="visibility fa-solid fa-at" title="Mentioned Only" aria-label="mentioned only"></i>
{% elif post.visibility == 4 %}
- <i class="visibility fa-solid fa-link-slash" title="Local Only"></i>
+ <i class="visibility fa-solid fa-link-slash" title="Local Only" aria-label="local only"></i>
{% endif %}
{% if post.published %}
<a href="{% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %}" title="{{ post.published }}">{{ post.published | timedeltashort }}</a>
@@ -26,31 +26,31 @@
</time>
{% if request.identity %}
- <div class="actions">
+ <div class="actions" role="menubar">
{% include "activities/_reply.html" %}
{% include "activities/_like.html" %}
{% include "activities/_boost.html" %}
- <a title="Menu" class="menu" _="on click toggle .enabled on the next <menu/> then halt">
+ <a title="Menu" class="menu" _="on click toggle .enabled on the next <menu/> then halt" role="menuitem" aria-haspopup="menu">
<i class="fa-solid fa-caret-down"></i>
</a>
<menu>
- <a href="{{ post.urls.view }}">
+ <a href="{{ post.urls.view }}" role="menuitem">
<i class="fa-solid fa-comment"></i> View Post &amp; Replies
</a>
{% if post.author == request.identity %}
- <a href="{{ post.urls.action_edit }}">
+ <a href="{{ post.urls.action_edit }}" role="menuitem">
<i class="fa-solid fa-pen-to-square"></i> Edit
</a>
- <a href="{{ post.urls.action_delete }}">
+ <a href="{{ post.urls.action_delete }}" role="menuitem">
<i class="fa-solid fa-trash"></i> Delete
</a>
{% elif not post.local and post.url %}
- <a href="{{ post.url }}">
+ <a href="{{ post.url }}" role="menuitem">
<i class="fa-solid fa-arrow-up-right-from-square"></i> See Original
</a>
{% endif %}
{% if request.user.admin %}
- <a href="{{ post.urls.admin_edit }}">
+ <a href="{{ post.urls.admin_edit }}" role="menuitem">
<i class="fa-solid fa-gear"></i> View In Admin
</a>
{% endif %}
@@ -88,5 +88,5 @@
</div>
{% endif %}
- <a class="whole-box" href="{{ post.urls.view }}"></a>
+ <a class="whole-box" href="{{ post.urls.view }}" tabindex="-1"></a>
</div>