a11y: link map label to map content (#88645)

This commit is contained in:
Frédéric Péters 2024-03-25 16:11:55 +01:00
parent 6f6859098a
commit 770f2dbae2
2 changed files with 2 additions and 2 deletions

View File

@ -1987,7 +1987,7 @@ def test_form_preview_map_field(pub):
app = login(get_app(pub))
resp = app.get('/backoffice/forms/1/')
assert 'qommon.map.js' in resp.text
assert resp.pyquery('#map-f1')
assert resp.pyquery('#form_f1.qommon-map')
def test_form_preview_do_not_log_error(pub):

View File

@ -2,7 +2,7 @@
{% block widget-control %}
<input type="hidden" name="{{widget.name}}$latlng" {% if widget.value %}value="{{widget.value}}"{% endif %}>
<div id="map-{{widget.get_name_for_id}}" class="qommon-map"
<div id="form_{{widget.get_name_for_id}}" class="qommon-map"
{% if widget.readonly %}data-readonly="true"{% endif %}
{% if widget.sync_map_and_address_fields %}data-address-sync="true"{% endif %}
{% for key, value in widget.map_attributes.items %}{{key}}="{{value}}" {% endfor %}