Accessibility improvements to hint_style for emails #5372
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the email's top(email_summary) and bottom(email_footer) parts don't necessarily pass the contrast test. The text colour uses body_text_color, and the background colour for the top and bottom sections is not set, so the hint text is above whatever the body_background_color is. Looking at some cobrands, I can see that the problem is not only with FMS. The solution on this commit gives hint_style a background that uses color_white as a variable, and because the text is using the body_text_color, it is less likely the contrast test will fail. The scenario where this could happen is when body_text_color is using a light colour, which, so far, I haven't seen a cobrand doing this.
Screen.Recording.2025-02-17.at.14.16.05.mov
Important:
email_top
andemail_bottom
templates for: Hackney, Bathnes and Fixamingataemail_summary
it does seem like it could be done. However looking at theemail_summary
content across cobrands it seems like it doesn't mimic the main title of the email 100% of the time. Reason why I didn't remove it.I added an extra commit that corrects the extra space use by "This email was sent from a staging site."
Before
After
[skip changelog]