mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-09 03:36:48 +00:00
fix(templates): the dialogs only a real host shows have accessible names
An accessibility scan of the pages on a real host (the earlier scans ran on libvirt's test driver) found unnamed elements the test driver never renders: the network page's add fixed address buttons and their dialog fields, the XML box of each nwfilter's details dialog and the convert checkbox of the volume clone dialog. The buttons get a title, the labels a for= and the fields an id, the XML box an aria-label.
This commit is contained in:
parent
f4cdd91210
commit
59e120e62d
4 changed files with 21 additions and 21 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
{% if request.user.is_superuser %}
|
||||
<a href="#AddFixedNet4" type="button" class="btn btn-success float-end" data-bs-toggle="modal">
|
||||
<a href="#AddFixedNet4" type="button" class="btn btn-success float-end" title="{% trans "Add IPv4 Fixed Address" %}" data-bs-toggle="modal">
|
||||
<span aria-hidden="true">{% bs_icon 'plus' %} </span>
|
||||
</a>
|
||||
|
||||
|
|
@ -16,27 +16,27 @@
|
|||
<form method="post" action="" role="form" aria-label="Add IPV6 Fixed Address">{% csrf_token %}
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<label class="col-sm-4 col-form-label">{% trans "Subnet Pool" %}</label>
|
||||
<label for="ipv4_fixed_subnet" class="col-sm-4 col-form-label">{% trans "Subnet Pool" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" readonly class="form-control" name="subnet" value="{{ ipv4_network }}" required pattern="[0-9\/\.]+">
|
||||
<input id="ipv4_fixed_subnet" type="text" readonly class="form-control" name="subnet" value="{{ ipv4_network }}" required pattern="[0-9\/\.]+">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-sm-4 col-form-label">{% trans "MAC" %}</label>
|
||||
<label for="ipv4_fixed_mac" class="col-sm-4 col-form-label">{% trans "MAC" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name="mac" required pattern="[0-9a-fA-F:]+">
|
||||
<input id="ipv4_fixed_mac" type="text" class="form-control" name="mac" required pattern="[0-9a-fA-F:]+">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-sm-4 col-form-label">{% trans "Name" %}</label>
|
||||
<label for="ipv4_fixed_name" class="col-sm-4 col-form-label">{% trans "Name" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name="name" pattern="[a-zA-Z0-9_.\-]+">
|
||||
<input id="ipv4_fixed_name" type="text" class="form-control" name="name" pattern="[a-zA-Z0-9_.\-]+">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-sm-4 col-form-label">{% trans "Address" %}</label>
|
||||
<label for="ipv4_fixed_address" class="col-sm-4 col-form-label">{% trans "Address" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name="address" required pattern="[0-9\/\.]+">
|
||||
<input id="ipv4_fixed_address" type="text" class="form-control" name="address" required pattern="[0-9\/\.]+">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap_icons %}
|
||||
{% if request.user.is_superuser %}
|
||||
<a href="#AddFixedNet6" type="button" class="btn btn-success float-end" data-bs-toggle="modal">
|
||||
<a href="#AddFixedNet6" type="button" class="btn btn-success float-end" title="{% trans "Add IPV6 Fixed Address" %}" data-bs-toggle="modal">
|
||||
<span aria-hidden="true">{% bs_icon 'plus' %} </span>
|
||||
</a>
|
||||
|
||||
|
|
@ -16,27 +16,27 @@
|
|||
<form method="post" action="" role="form" aria-label="Add IPV6 Fixed Address form">{% csrf_token %}
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<label class="col-sm-4 col-form-label">{% trans "Subnet Pool" %}</label>
|
||||
<label for="ipv6_fixed_subnet" class="col-sm-4 col-form-label">{% trans "Subnet Pool" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" readonly class="form-control" name="subnet" value="{{ ipv6_network }}" required pattern="[0-9\/\.]+">
|
||||
<input id="ipv6_fixed_subnet" type="text" readonly class="form-control" name="subnet" value="{{ ipv6_network }}" required pattern="[0-9\/\.]+">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-sm-4 col-form-label">{% trans "ID" %}</label>
|
||||
<label for="ipv6_fixed_id" class="col-sm-4 col-form-label">{% trans "ID" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name="id" required pattern="[0-9a-fA-F\/\:]+">
|
||||
<input id="ipv6_fixed_id" type="text" class="form-control" name="id" required pattern="[0-9a-fA-F\/\:]+">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-sm-4 col-form-label">{% trans "Name" %}</label>
|
||||
<label for="ipv6_fixed_name" class="col-sm-4 col-form-label">{% trans "Name" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name="name" pattern="[a-zA-Z0-9_.\-]+">
|
||||
<input id="ipv6_fixed_name" type="text" class="form-control" name="name" pattern="[a-zA-Z0-9_.\-]+">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-sm-4 col-form-label">{% trans "Address" %}</label>
|
||||
<label for="ipv6_fixed_address" class="col-sm-4 col-form-label">{% trans "Address" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name="address" required pattern="[a-fA-F0-9\/\:]+">
|
||||
<input id="ipv6_fixed_address" type="text" class="form-control" name="address" required pattern="[a-fA-F0-9\/\:]+">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<textarea rows="10" class="w-100">
|
||||
<textarea rows="10" class="w-100" aria-label="{% trans "Details of NWFilter" %}">
|
||||
{{ nwfilter.xml }}
|
||||
</textarea>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -130,9 +130,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="row" id="image_format">
|
||||
<label class="col-sm-3 col-form-label">{% trans "Convert" %}</label>
|
||||
<label class="col-sm-3 col-form-label" for="clone{{ forloop.counter }}_convert">{% trans "Convert" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input class="volume-convert" type="checkbox" name="convert" value="true">
|
||||
<input class="volume-convert" type="checkbox" name="convert" value="true" id="clone{{ forloop.counter }}_convert">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row format-convert">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue