Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions common/templates/email_contact_sales.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{% extends "base.html" %} {% block title %}New Subscription Request - {{
plan_name }}{% endblock %} {% block content %}
{% extends "base.html" %} {% block title %}New Subscription Request - {{ plan_name }}{% endblock %} {% block content %}
<div style="margin-bottom: 30px">
{% if header_image_url %}
<div class="illustration">
<img src="{{ header_image_url }}" alt="New Subscription Request" />
</div>
{% endif %}
Comment on lines +3 to +7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since the <h1> heading immediately following this image already contains the text "New Subscription Request", having the same text as the alt attribute of the image is redundant for screen readers. According to accessibility best practices (WCAG), decorative header images or images whose meaning is already conveyed by adjacent text should have an empty alt attribute (alt="") to prevent screen readers from announcing the same information twice.

  {% if header_image_url %}
  <div class="illustration">
    <img src="{{ header_image_url }}" alt="" />
  </div>
  {% endif %}

<h1 style="color: {{ contrast_background_color }}">
New Subscription Request - {{ plan_name }}
</h1>
Expand Down
3 changes: 2 additions & 1 deletion common/utils/email_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def get_email_context(email_context_data, custom_email):
or email_context_data.get("sender_email", "support@spacedf.com")
),
"email_footer": (_get_value(custom_email, "footer_text") or ""),
"header_image_url": _get_value(custom_email, "url_header_image") or "",
"header_image_url": _get_value(custom_email, "url_header_image")
or email_context_data.get("header_image_url", ""),
"linkedin_url": social_links.get("linkedin_url", ""),
"facebook_url": social_links.get("facebook_url"),
"instagram_url": social_links.get("instagram_url"),
Expand Down
Loading