nav icon indicating copy to clipboard operation
nav copied to clipboard

Align inputs in forms using CSS instead of `<label>&nbsp;</label>`

Open podliashanyk opened this issue 4 months ago • 0 comments

Label tags like this <label>&nbsp;</label> are used solely for styling in NAV (which is both semantically ill-suited and a bad practice when it comes to accessibility). ... So the SonarCloud complaint is technically correct, but factually <label>&nbsp;</label> is not used in form control.

Originally posted by @podliashanyk in https://github.com/Uninett/nav/pull/3139#discussion_r1800922599

Occurrences:

  • [ ] python/nav/web/templates/alertprofiles/filter_form.html - alertprofiles/filters/new, alertprofiles/filters/edit/<filter_id>
  • [ ] python/nav/web/templates/custom_crispy_templates/submit_field.html - anything calling SubmitField with has_empty_label=True

podliashanyk avatar Oct 15 '24 12:10 podliashanyk