Allow to add declaration of accessibility (#5140)

* Allow to add declaration of accessibility

* add fallback for empty accessibility_title

* unify label format (not "Title for")

* move title to top and set helptext before text

---------

Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
Raphael Michel
2025-05-28 13:23:04 +02:00
committed by GitHub
parent 84a909b889
commit e46e689f01
10 changed files with 100 additions and 0 deletions

View File

@@ -2063,6 +2063,38 @@ DEFAULTS = {
),
'serializer_class': I18nURLField,
},
'accessibility_url': {
'default': None,
'type': LazyI18nString,
'form_class': I18nURLFormField,
'form_kwargs': dict(
label=_("Accessibility information URL"),
help_text=_("This should point e.g. to a part of your website that explains how your ticket shop complies "
"with accessibility regulation."),
widget=I18nTextInput,
),
'serializer_class': I18nURLField,
},
'accessibility_title': {
'default': LazyI18nString.from_gettext(gettext_noop("Accessibility information")),
'type': LazyI18nString,
'form_class': I18nFormField,
'form_kwargs': dict(
label=_("Accessibility information title"),
widget=I18nTextInput,
),
'serializer_class': I18nURLField,
},
'accessibility_text': {
'default': None,
'type': LazyI18nString,
'form_class': I18nFormField,
'form_kwargs': dict(
label=_("Accessibility information text"),
widget=I18nMarkdownTextarea,
),
'serializer_class': I18nURLField,
},
'confirm_texts': {
'default': LazyI18nStringList(),
'type': LazyI18nStringList,