From 3ef6d4b4ece64a63f32aa1dcf31909da501b885a Mon Sep 17 00:00:00 2001 From: Christoph Krybus Date: Wed, 6 Dec 2023 21:33:03 +0100 Subject: [PATCH] Change help text id naming to support django 5.0 aria-describedby attribute --- HISTORY.rst | 2 ++ crispy_bulma/templates/bulma/layout/help_text.html | 2 +- tests/results/help_text_escape.html | 2 +- tests/results/help_text_escape__lt50.html | 2 +- tests/results/test_email_field.html | 2 +- tests/results/test_email_field__lt50.html | 2 +- tests/results/test_form_group.html | 2 +- tests/results/test_form_group__lt50.html | 2 +- tests/results/test_form_group_horizontal.html | 2 +- tests/results/test_form_group_horizontal__lt50.html | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 83a4edb..bd58e19 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -9,6 +9,8 @@ Unreleased * Add support for Django 5.0 * Drop support for Django 3.2, 4.0 and 4.1 * Add support for django-crispy-forms 2.1 +* BREAKING CHANGE: help text id attribute is now differently named: + ``hint_{{ field.auto_id }}`` -> ``{{ field.auto_id }}_helptext`` 0.10.0 (2023-07-03) diff --git a/crispy_bulma/templates/bulma/layout/help_text.html b/crispy_bulma/templates/bulma/layout/help_text.html index c0dfb5a..7f396c6 100644 --- a/crispy_bulma/templates/bulma/layout/help_text.html +++ b/crispy_bulma/templates/bulma/layout/help_text.html @@ -1,3 +1,3 @@ {% if field.help_text %} -

{{ field.help_text|safe }}

+

{{ field.help_text|safe }}

{% endif %} diff --git a/tests/results/help_text_escape.html b/tests/results/help_text_escape.html index 83c2a9a..7853fc3 100644 --- a/tests/results/help_text_escape.html +++ b/tests/results/help_text_escape.html @@ -4,6 +4,6 @@
-

Insert your email

+

Insert your email

diff --git a/tests/results/help_text_escape__lt50.html b/tests/results/help_text_escape__lt50.html index 81ef7f3..3a93c25 100644 --- a/tests/results/help_text_escape__lt50.html +++ b/tests/results/help_text_escape__lt50.html @@ -4,6 +4,6 @@
-

Insert your email

+

Insert your email

diff --git a/tests/results/test_email_field.html b/tests/results/test_email_field.html index 0d7d6d6..308d06d 100644 --- a/tests/results/test_email_field.html +++ b/tests/results/test_email_field.html @@ -4,6 +4,6 @@
-

Insert your email

+

Insert your email

diff --git a/tests/results/test_email_field__lt50.html b/tests/results/test_email_field__lt50.html index 3b1e6b8..fce6dfd 100644 --- a/tests/results/test_email_field__lt50.html +++ b/tests/results/test_email_field__lt50.html @@ -4,6 +4,6 @@
-

Insert your email

+

Insert your email

diff --git a/tests/results/test_form_group.html b/tests/results/test_form_group.html index 1aac9b8..64b6acf 100644 --- a/tests/results/test_form_group.html +++ b/tests/results/test_form_group.html @@ -8,7 +8,7 @@
-

+

help on a text_input

diff --git a/tests/results/test_form_group__lt50.html b/tests/results/test_form_group__lt50.html index c0f6816..adf6710 100644 --- a/tests/results/test_form_group__lt50.html +++ b/tests/results/test_form_group__lt50.html @@ -8,7 +8,7 @@
-

+

help on a text_input

diff --git a/tests/results/test_form_group_horizontal.html b/tests/results/test_form_group_horizontal.html index 1f97e64..6c78f6a 100644 --- a/tests/results/test_form_group_horizontal.html +++ b/tests/results/test_form_group_horizontal.html @@ -12,7 +12,7 @@
-

+

help on a text_input

diff --git a/tests/results/test_form_group_horizontal__lt50.html b/tests/results/test_form_group_horizontal__lt50.html index c90d9f5..659d2b0 100644 --- a/tests/results/test_form_group_horizontal__lt50.html +++ b/tests/results/test_form_group_horizontal__lt50.html @@ -12,7 +12,7 @@
-

+

help on a text_input