[profile] Various HTML fixes:

- Wrap block level elements within block level elements, not inline.
- Avoid empty blocks.
- Change `<hr>` in lists into allowed type of children.
- Fix duplicated ID (some change that was not propagated across the template?).
- Make the anchor optional in the navbar (interactive elements (`a`, `input`, `button`…) should not appear into other interactive elements).
- Remove redundant `role` on main navigation.
- Make the modal a modal with `role="dialog".
- Use `button` instead of form-less `label`.
This commit is contained in:
Fabien Basmaison
2021-03-03 20:10:09 +01:00
parent 0d8eb959ea
commit a05b14c338
7 changed files with 61 additions and 23 deletions

View File

@ -5,7 +5,7 @@
{% block dropdown-trigger %}{% endblock %}
</button>
<div class="dropdown-menu">
<ul class="dropdown-content" role="menu" id="menu-options-{{ book.id }}">
<ul class="dropdown-content" role="menu" id="menu-options-{{ uuid }}">
{% block dropdown-list %}{% endblock %}
</ul>
</div>

View File

@ -1,8 +1,13 @@
<div class="modal hidden" id="{{ controls_text }}-{{ controls_uid }}">
<div
role="dialog"
class="modal hidden"
id="{{ controls_text }}-{{ controls_uid }}"
aria-labelledby="modal-card-title-{{ controls_uid }}"
>
<div class="modal-background"></div>
<div class="modal-card">
<header class="modal-card-head" tabindex="0" id="modal-title-{{ controls_text }}-{{ controls_uid }}">
<h2 class="modal-card-title">
<h2 class="modal-card-title" id="modal-card-title-{{ controls_uid }}">
{% block modal-title %}{% endblock %}
</h2>
{% include 'snippets/toggle/toggle_button.html' with label="close" class="delete" nonbutton=True %}
@ -18,7 +23,7 @@
</footer>
{% block modal-form-close %}{% endblock %}
</div>
<label class="modal-close is-large" for="{{ controls_text }}-{{ controls_uid }}" aria-label="close"></label>
<button class="modal-close is-large" aria-label="close"></button>
{% include 'snippets/toggle/toggle_button.html' with label="close" class="modal-close is-large" nonbutton=True %}
</div>