-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Email: Small fixes for best practice #965
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
📝 Walkthrough📝 WalkthroughWalkthroughThe pull request includes updates to multiple HTML email templates, primarily enhancing accessibility by adding a Changes
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🔇 Additional comments (3)shared/emails/transactional/welcome-2-it.html (1)
The HTML lang attribute correctly matches the Italian content. shared/emails/transactional/welcome-2-fr.html (2)
The HTML lang attribute is properly set to "fr" for French content, addressing the previous review comment. Line range hint The template follows accessibility best practices:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Visit the preview URL for this PR (updated for commit 8ec0cbf): https://si-admin-staging--pr965-sandino-email-best-p-1tjmarvt.web.app (expires Mon, 09 Dec 2024 13:59:29 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: b7b0969384059dce6ea8fad1ee1d1737e54e6676 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (9)
shared/emails/transactional/welcome-2-de.html (1)
Line range hint
250-251
: Add localized alt text for imagesThe image alt attributes should be localized to German for better accessibility.
-alt="Logo" +alt="Logo Social Income" -alt="" +alt="Illustration zur Armutsbekämpfung"Also applies to: 261-262
shared/emails/transactional/welcome-2-fr.html (1)
Line range hint
250-251
: Add localized alt text for imagesThe image alt attributes should be localized to French for better accessibility.
-alt="Logo" +alt="Logo Social Income" -alt="" +alt="Illustration sur la lutte contre la pauvreté"Also applies to: 261-262
shared/emails/transactional/welcome-4-it.html (1)
Line range hint
48-56
: Fix inconsistent width attributes in logo imageThe logo image has conflicting width values:
- HTML width attribute:
width="48"
- Inline style:
width: 250px
Apply this fix:
<img src="http://cdn.mcauto-images-production.sendgrid.net/044784a789c4863a/b641e150-9ec7-4220-b6a3-2616e65915ac/935x101.png" alt="Logo" - width="48" + width="250" style="display: block; width: 250px; max-width: 250px; min-width: 250px" />shared/emails/transactional/welcome-1-fr.html (1)
Line range hint
48-48
: Add French alt text for images.Image alt texts should be localized to French for better accessibility.
Apply this change to the image elements:
-alt="Logo" +alt="Logo Social Income"-alt="Portrait Aurélie" +alt="Portrait d'Aurélie"-alt="Signature" +alt="Signature d'Aurélie"Also applies to: 122-122, 209-209
shared/emails/transactional/welcome-3-it.html (1)
Line range hint
48-48
: Fix inconsistent image width attributes.The logo image has mismatched width attributes:
width="48"
in the HTML attributewidth: 250px
in the style attributeApply this fix:
-width="48" +width="250"shared/emails/newsletter/2024-09-newsletter.html (4)
2-2
: Good addition of the lang attribute for accessibility!The addition of the
lang="en"
attribute improves screen reader support and browser language detection.Consider adding
aria-label
attributes to interactive elements andalt
text to all images for better accessibility.
Line range hint
8-117
: Consider additional email client compatibility improvementsWhile the template includes good email client compatibility practices, consider these additional improvements:
- Add MSO line-height fixes for Outlook
- Include WebKit-specific media queries for better iOS rendering
<style type="text/css"> + /* MSO line-height fix */ + * { + mso-line-height-rule: exactly; + } + + /* iOS webkit fix */ + @media screen and (-webkit-min-device-pixel-ratio:0) { + .body { + margin: 0 !important; + } + }
Line range hint
8-67
: Optimize repeated styles using CSS classesSeveral inline styles are repeated throughout the template. Consider extracting common styles into CSS classes to improve maintainability.
<style type="text/css"> + .text-primary { + font-family: 'Unica77', Helvetica, Arial, sans-serif; + font-weight: 400; + font-size: 22px; + line-height: 30px; + color: #191a19; + }
Line range hint
571-579
: Good security practices for external links!The consistent use of
target="_blank"
withrel="noopener noreferrer"
prevents potential security vulnerabilities.Consider adding UTM parameters to external links for better tracking of newsletter engagement.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (26)
shared/emails/newsletter/2024-05-newsletter.html
(1 hunks)shared/emails/newsletter/2024-06-newsletter.html
(1 hunks)shared/emails/newsletter/2024-07-newsletter.html
(1 hunks)shared/emails/newsletter/2024-08-newsletter.html
(1 hunks)shared/emails/newsletter/2024-09-newsletter.html
(1 hunks)shared/emails/newsletter/2024-10-newsletter.html
(1 hunks)shared/emails/newsletter/2024-11-newsletter.html
(0 hunks)shared/emails/transactional/payout-email-de.html
(1 hunks)shared/emails/transactional/payout-email-en.html
(1 hunks)shared/emails/transactional/payout-email-fr.html
(1 hunks)shared/emails/transactional/payout-email-it.html
(1 hunks)shared/emails/transactional/welcome-1-de.html
(1 hunks)shared/emails/transactional/welcome-1-en.html
(1 hunks)shared/emails/transactional/welcome-1-fr.html
(1 hunks)shared/emails/transactional/welcome-1-it.html
(1 hunks)shared/emails/transactional/welcome-2-de.html
(1 hunks)shared/emails/transactional/welcome-2-en.html
(1 hunks)shared/emails/transactional/welcome-2-fr.html
(1 hunks)shared/emails/transactional/welcome-3-de.html
(1 hunks)shared/emails/transactional/welcome-3-en.html
(1 hunks)shared/emails/transactional/welcome-3-fr.html
(1 hunks)shared/emails/transactional/welcome-3-it.html
(1 hunks)shared/emails/transactional/welcome-4-de.html
(1 hunks)shared/emails/transactional/welcome-4-en.html
(1 hunks)shared/emails/transactional/welcome-4-fr.html
(1 hunks)shared/emails/transactional/welcome-4-it.html
(1 hunks)
💤 Files with no reviewable changes (1)
- shared/emails/newsletter/2024-11-newsletter.html
✅ Files skipped from review due to trivial changes (9)
- shared/emails/transactional/payout-email-it.html
- shared/emails/transactional/payout-email-en.html
- shared/emails/transactional/payout-email-de.html
- shared/emails/newsletter/2024-07-newsletter.html
- shared/emails/transactional/welcome-3-en.html
- shared/emails/newsletter/2024-08-newsletter.html
- shared/emails/newsletter/2024-05-newsletter.html
- shared/emails/transactional/welcome-2-en.html
- shared/emails/transactional/payout-email-fr.html
👮 Files not reviewed due to content moderation or server errors (3)
- shared/emails/transactional/welcome-3-fr.html
- shared/emails/newsletter/2024-06-newsletter.html
- shared/emails/newsletter/2024-10-newsletter.html
🔇 Additional comments (11)
shared/emails/transactional/welcome-2-de.html (1)
1-2
: LGTM: Proper language attribute set
The HTML lang attribute is correctly set to "de" for German content.
shared/emails/transactional/welcome-4-de.html (1)
1-2
: LGTM: Proper language attribute set
The HTML lang attribute is correctly set to "de" for German content.
shared/emails/transactional/welcome-1-de.html (1)
2-2
: LGTM: Proper language declaration added
The addition of lang="de"
attribute correctly identifies German content, improving accessibility for screen readers and search engines.
shared/emails/transactional/welcome-4-en.html (1)
2-2
: LGTM: Proper language declaration added
The addition of lang="en"
attribute correctly identifies English content, improving accessibility.
shared/emails/transactional/welcome-4-it.html (1)
2-2
: LGTM: Proper language declaration added
The addition of lang="it"
attribute correctly identifies Italian content, improving accessibility.
shared/emails/transactional/welcome-4-fr.html (1)
2-2
: LGTM: Proper language attribute added
The lang="fr"
attribute correctly specifies French as the document language, improving accessibility.
shared/emails/transactional/welcome-1-it.html (1)
2-2
: LGTM: Proper language attribute added
The lang="it"
attribute correctly specifies Italian as the document language, improving accessibility.
shared/emails/transactional/welcome-1-en.html (1)
2-2
: LGTM: Proper language attribute added
The lang="en"
attribute correctly specifies English as the document language, improving accessibility.
shared/emails/transactional/welcome-1-fr.html (1)
2-2
: LGTM! Language attribute correctly set.
The lang="fr"
attribute properly indicates French content, improving accessibility and SEO.
shared/emails/transactional/welcome-3-de.html (1)
2-2
: LGTM! Language attribute correctly set.
The lang="de"
attribute properly indicates German content, improving accessibility and SEO.
shared/emails/transactional/welcome-3-it.html (1)
2-2
: LGTM! Language attribute correctly set.
The lang="it"
attribute properly indicates Italian content, improving accessibility and SEO.
<!doctype html> | ||
<html xmlns="http://www.w3.org/1999/html"> | ||
<html lang="it"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix language attribute mismatch
The HTML lang attribute is set to "it" (Italian) but the content is in French. This affects accessibility tools and search engines.
-<html lang="it">
+<html lang="fr">
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
<!doctype html> | |
<html xmlns="http://www.w3.org/1999/html"> | |
<html lang="it"> | |
<!doctype html> | |
<html lang="fr"> |
…o sandino/email-best-practice
Summary by CodeRabbit
New Features
Content Updates
Structural Improvements