templates: use field.id_for_label in field title id attribute (#74526)
gitea/gadjo/pipeline/head This commit looks good
Details
gitea/gadjo/pipeline/head This commit looks good
Details
This commit is contained in:
parent
bbcd17465f
commit
45bac77a26
|
@ -6,7 +6,7 @@
|
|||
{% if field.field.required %}widget-required{% else %}widget-optional{% endif %}"
|
||||
{% if field.id_for_label %}id="{{field.id_for_label}}_p"{% endif %}>
|
||||
{% block widget-title %}
|
||||
<div class="title" id="{{ field.name }}">
|
||||
<div class="title" {% if field.id_for_label %}id="{{ field.id_for_label }}_title"{% endif %}>
|
||||
{{ field.label_tag }}
|
||||
{% if field.field.required %}
|
||||
<span title="{% trans "This field is required." %}" class="required">*</span>
|
||||
|
@ -16,7 +16,9 @@
|
|||
</div>
|
||||
{% endblock %}
|
||||
{% block widget-content %}
|
||||
<div class="content" aria-labelledby="{{ field.name }}" {% block widget-attrs %}{% endblock %}>
|
||||
<div class="content"
|
||||
{% if field.id_for_label %}aria-labelledby="{{ field.id_for_label }}_title"{% endif %}
|
||||
{% block widget-attrs %}{% endblock %}>
|
||||
{% block widget-error %}
|
||||
{% if field.errors %}
|
||||
<div class="error"><p>
|
||||
|
|
Loading…
Reference in New Issue