mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
A11y improvements (#2081)
Co-authored-by: Raphael Michel <michel@rami.io> Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
This commit is contained in:
committed by
GitHub
parent
cc13ca1c3f
commit
3dcfa57b70
@@ -103,7 +103,11 @@ class CheckoutFieldRenderer(FieldRenderer):
|
||||
if self.field_help:
|
||||
help_text_and_errors.append(self.field_help)
|
||||
for idx, text in enumerate(help_text_and_errors):
|
||||
html += '<div class="help-block" id="help-for-{id}-{idx}">{text}</div>'.format(id=self.field.id_for_label, text=text, idx=idx)
|
||||
if text.lower().startswith("<p>") or text.lower().startswith("<p "):
|
||||
html_tag = "div"
|
||||
else:
|
||||
html_tag = "p"
|
||||
html += '<{tag} class="help-block" id="help-for-{id}-{idx}">{text}</{tag}>'.format(id=self.field.id_for_label, text=text, idx=idx, tag=html_tag)
|
||||
return html
|
||||
|
||||
def add_help_attrs(self, widget=None):
|
||||
|
||||
Reference in New Issue
Block a user