Skip to content
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

PC-1731: Fix variations in text conveying information #361

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

samyou-softwire
Copy link
Contributor

Link to Jira ticket

Description

Replace b and non-specific span tags throughout the app

Note GDS does not explicitly recommend using the strong tag, prefering the use of the govuk-!-font-weight-bold class. Where no classes are specified, I've added the GDS one to ensure semantic HTML and correct styling

Checklist

  • I have made any necessary updates to the documentation
  • If necessary, I've added QA guidance notes to the original ticket
  • I have checked there are no unnecessary IDE warnings in this PR
  • I have checked there are no unintentional line ending changes
  • I have added tests where applicable
  • If I have made any changes to the code, I have used the IDE auto-formatter on it

Screenshots

image
image
image
image
image
image

apply the govuk bold class where class is unspecified, to ensure it's consistently styled
@@ -7,18 +7,18 @@
@if (Model.GetCurrentPropertyRecommendation().Key != RecommendationKey.InstallHeatPump)
{
<div class="govuk-grid-column-full sea-yearly-savings govuk-!-margin-bottom-2">
<span class="govuk-heading-s govuk-!-margin-bottom-0"><b>@SharedLocalizer["This could save up to"]</b></span>
<span class="govuk-heading-s govuk-!-margin-bottom-0"><strong class="govuk-!-font-weight-bold">@SharedLocalizer["This could save up to"]</strong></span>
Copy link
Contributor

Choose a reason for hiding this comment

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

We need the govuk-!-font-weight-bold class as well here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, though I think looking back on this it's more natural to copy the other similar instances and make the parent <strong> and remove the inner tag entirely

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, this was a question rather than a statement

Copy link
Contributor Author

@samyou-softwire samyou-softwire Feb 13, 2025

Choose a reason for hiding this comment

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

ah sorry, I agree with that we don't need the class on the inner element, though opted to remove the inner element entirely.

for what its worth, I don't think in any case I've checked so far the govuk class has a noticeable impact on the text styling. <strong> by itself seems to be styled. I include it only as GDS signposts this as the way to make text bold

Copy link
Contributor

Choose a reason for hiding this comment

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

Might be worth digging into a bit. I'd vote for not having the class unless there's a particular reason for it (on top of <strong>)

remove some nested b tags and make the parent strong instead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants