1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-02 08:56:07 +00:00
webvirtcloud/templates/error.html
catborise 7196871880 fix(ui): pages have a main heading, a skip link and labelled search boxes
An accessibility sweep (axe-core on 22 pages in four themes, and the
keyboard) found:

- No page had an h1: the page heading was an h3, and pages with their
  own heading (sign-in, Computes, errors) kept an empty one. The heading
  is an h1 at the same size; those pages leave the empty one out, and
  Balance has a hidden h1 beside its breadcrumb. Tests check every page,
  an error page and the lock page for one h1 and no empty heading.
- Keyboard users went through the whole menu on every page: a "Skip to
  content" link shows when it has the focus, and brings the content up
  below the sticky navbar. The OTP QR page takes only a signed token from
  its fragment, not the link's #main.
- Tom Select moves a field's label to its own box, leaving the hidden
  select it keeps unnamed (the Tags field of a host, the owner forms'
  user and VM): the label names it too.
- Put in maintenance was yellow text on white (1.6:1), an outline
  secondary button now.
- The pool page's Volumes heading skipped a level.
2026-11-21 15:16:49 +03:00

40 lines
1.8 KiB
HTML

{% extends "base.html" %}
{% load i18n %}
{% block page_header %}{% endblock page_header %}{# the page has its own heading #}
{% block content %}
<div class="row justify-content-center py-3 py-sm-4">
<div class="col-12 col-lg-10">
<section class="card shadow-sm" aria-labelledby="error-heading">
<div class="card-body p-4 p-sm-5">
<div class="mb-3">
<span class="badge d-inline-flex align-items-center gap-2 rounded-pill fs-6 px-3 py-2 {% block status_classes %}text-bg-secondary{% endblock %}">
<i class="bi {% block icon %}bi-exclamation-circle{% endblock %}" aria-hidden="true"></i>
<span class="font-monospace">
<span class="visually-hidden">{% trans "HTTP status" %} </span>
{% block code %}{% endblock %}
</span>
</span>
</div>
<h1 id="error-heading" class="h3 mb-3">{% block heading %}{% endblock %}</h1>
<div class="text-break">
{% block text %}{% endblock %}
</div>
<div class="d-grid d-sm-flex gap-2 mt-4">
<a class="btn btn-primary" href="#" data-history-back>
<i class="bi bi-arrow-left me-1" aria-hidden="true"></i>
{% trans "Back" %}
</a>
<a class="btn btn-secondary" href="{% url 'index' %}">
<i class="bi bi-house me-1" aria-hidden="true"></i>
{% trans "Home" %}
</a>
</div>
</div>
</section>
</div>
</div>
{% endblock %}