Files
snikket-web-portal/snikket_web/templates/user_home.html
Jonas Schäfer 9612926230 Address a bunch of accessibility issues
- Add missing labels for form fields
- Improve contrast slightly
- Remove incorrect aria-label= and title= attributes
- Use fieldset for radio button groups
2021-01-29 15:58:54 +01:00

49 lines
2.0 KiB
HTML

{% extends "app.html" %}
{% from "library.j2" import clipboard_button, standard_button, avatar with context %}
{% set body_id = "home" %}
{% block head_lead %}
{{ super() }}
{% include "copy-snippet.html" %}
{% endblock %}
{% block content %}
<h1>{% trans %}Welcome!{% endtrans %}</h1>
<p>{% trans user_name=user_info.display_name %}Welcome home, {{ user_name }}.{% endtrans %}</p>
<nav class="welcome">
<ul>
<li class="wide">
<h2>{% trans %}Your account{% endtrans %}</h2>
<div class="profile-card">
<div class="picture" aria-label="Your profile picture">{% call avatar(user_info.address, user_info.avatar_hash ) %}{% endcall %}</div>
<div class="details">
<div class="display-name">{{ user_info.display_name | default(user_info.username) }}</div>
<div class="address">
<input value="{{ user_info.address }}" aria-label="{% trans %}Your XMPP address{% endtrans %}">
{% call clipboard_button(user_info.address) %}{% trans %}Copy address{% endtrans %}{% endcall %}
</div>
</div>
</div>
{#- -#}
{# <p>{% trans %}Change your display name, set a profile picture and control visibility of your personal data to others.{% endtrans %}</p> #}
{#- -#}
{# <img aria-hidden="true" src="{{ url_for("static", filename="img/illus-profile.svg") }}"> #}
{#- -#}
<div>
<div>{% call standard_button("edit", url_for(".profile"), class="primary") %}{% trans %}Edit profile{% endtrans %}{% endcall %}</div>
<div>{% call standard_button("passwd", url_for(".change_pw"), class="secondary") %}{% trans %}Change password{% endtrans %}{% endcall %}</div>
</div>
{#- -#}
</li>
{% if user_info.is_admin %}
<li>
<h2>{% trans %}Your Snikket{% endtrans %}</h2>
{#- -#}
<p>{% trans %}Manage users, invitations and circles of your Snikket service.{% endtrans %}</p>
{#- -#}
<div>{% call standard_button("admin", url_for("admin.index"), class="primary") %}{% trans %}Admin panel{% endtrans %}{% endcall %}</div>
{#- -#}
</li>
{% endif %}
</ul>
</nav>
{% endblock %}