Skip to content

Commit 840c383

Browse files
PIL-2771 Update the homepage title and H1 (#630)
PIL-2771: Update the homepage title and H1 Co-authored-by: Kevin Coatsworth <29205960+kevincoatsworth@users.noreply.github.com>
1 parent 918dffd commit 840c383

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

app/views/HomepageView.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
</div>
7373
}
7474

75-
@layout(pageTitle = noTitle, showBackLink = false, twoThirdsPagelayout = false, bannerUrl = Some(routes.HomepageController.onPageLoad().url)) {
75+
@layout(pageTitle = s"${messages("homepage.title")} - ${messages("service.name")} - ${messages("site.govuk")}", showBackLink = false, twoThirdsPagelayout = false, bannerUrl = Some(routes.HomepageController.onPageLoad().url)) {
7676

7777
@btnBanner match {
7878
case BtnBanner.Show => {@govukNotificationBanner(NotificationBanner(content = HtmlContent(bannerHtml)))}

app/views/RegistrationInProgressView.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
@layout(pageTitle = noTitle, showBackLink = false, twoThirdsPagelayout = false, bannerUrl = Some(routes.HomepageController.onPageLoad().url)) {
2727

28-
<h1 class="govuk-heading-l">@messages("homepage.title")</h1>
28+
<h1 class="govuk-heading-l">@messages("registrationInProgress.h1")</h1>
2929

3030
<p class="govuk-body">
3131
<span><strong>@{messages("homepage.id")}:</strong> @plrReference</span>

conf/messages.en

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ subscriptionAddress.change.hidden = the registered contact address
845845
# Homepage
846846
#
847847
###############################################
848-
homepage.title = Pillar 2 Top-up Taxes
848+
homepage.title = Pillar 2 Top-up Taxes homepage
849849
homepage.group = Group
850850
homepage.id = ID
851851

@@ -1535,6 +1535,7 @@ manageContactDetails.h1 = Submitting your contact details
15351535
manageContactDetails.h2 = Do not press back in your browser or leave this page. It may take up to a minute to process this change.
15361536

15371537
registrationInProgress.title = Registration in progress
1538+
registrationInProgress.h1 = Pillar 2 Top-up Taxes
15381539
registrationInProgress.banner.heading = Your registration is in progress
15391540
registrationInProgress.banner.message = We are processing your registration. You can check this page in one hour to see your full group account homepage.
15401541

test/views/HomepageViewSpec.scala

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import models.{BtnBanner, DynamicNotificationAreaState}
2424
import org.jsoup.Jsoup
2525
import org.jsoup.nodes.{Document, Element}
2626
import org.jsoup.select.Elements
27+
import views.behaviours.ViewScenario
2728
import views.html.HomepageView
2829

2930
class HomepageViewSpec extends ViewSpecBase {
@@ -32,9 +33,8 @@ class HomepageViewSpec extends ViewSpecBase {
3233
lazy val plrRef: String = "XMPLR0012345678"
3334
lazy val date: String = "1 June 2020"
3435

35-
// This is only case where the page Title and the H1 heading are inconsistent in the service
36-
lazy val pageTitle: String = "Report Pillar 2 Top-up Taxes - GOV.UK"
37-
lazy val pageHeading: String = "Pillar 2 Top-up Taxes"
36+
lazy val pageTitle: String = "Pillar 2 Top-up Taxes homepage - Report Pillar 2 Top-up Taxes - GOV.UK"
37+
lazy val pageHeading: String = "Pillar 2 Top-up Taxes homepage"
3838

3939
lazy val organisationView: Document =
4040
Jsoup.parse(
@@ -510,13 +510,12 @@ class HomepageViewSpec extends ViewSpecBase {
510510
paidTag.attr("title") mustBe "Paid payments"
511511
}
512512

513-
// TODO: Uncomment accessibility behaviours once H1 and title are updated with correct naming convention
514-
// val organisationViewScenarios: Seq[ViewScenario] =
515-
// Seq(
516-
// ViewScenario("organisationView", organisationView)
517-
// )
518-
//
519-
// behaveLikeAccessiblePage(organisationViewScenarios)
513+
val organisationViewScenarios: Seq[ViewScenario] =
514+
Seq(
515+
ViewScenario("organisationView", organisationView)
516+
)
517+
518+
behaveLikeAccessiblePage(organisationViewScenarios)
520519
}
521520

522521
"HomepageView for an agent" should {
@@ -681,13 +680,12 @@ class HomepageViewSpec extends ViewSpecBase {
681680
controllers.routes.AgentController.onPageLoadClientPillarId.url
682681
}
683682

684-
// TODO: Uncomment accessibility behaviours once H1 and title are updated with correct naming convention
685-
// val agentViewScenarios: Seq[ViewScenario] =
686-
// Seq(
687-
// ViewScenario("agentView", agentView)
688-
// )
689-
//
690-
// behaveLikeAccessiblePage(agentViewScenarios)
683+
val agentViewScenarios: Seq[ViewScenario] =
684+
Seq(
685+
ViewScenario("agentView", agentView)
686+
)
687+
688+
behaveLikeAccessiblePage(agentViewScenarios)
691689
}
692690

693691
"HomepageView layout" should {

0 commit comments

Comments
 (0)