From 80f50e7bb178dceeacdf5a0b97c6f6e8e4288bba Mon Sep 17 00:00:00 2001 From: Nat Carey Date: Thu, 22 Apr 2021 16:06:26 +0100 Subject: [PATCH 1/2] PLATUI-1138: Adding android specific link. --- .../views/AccessibilityStatementTemplate.scala.html | 4 +++- conf/messages | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/uk/gov/hmrc/accessibilitystatementfrontend/views/AccessibilityStatementTemplate.scala.html b/app/uk/gov/hmrc/accessibilitystatementfrontend/views/AccessibilityStatementTemplate.scala.html index 412e5240d..e7950441a 100644 --- a/app/uk/gov/hmrc/accessibilitystatementfrontend/views/AccessibilityStatementTemplate.scala.html +++ b/app/uk/gov/hmrc/accessibilitystatementfrontend/views/AccessibilityStatementTemplate.scala.html @@ -42,7 +42,9 @@

@{messages("using-service.heading", serviceOrApp)}@messages("using-service.app.accessibility-features") + @messages("using-service.app.accessibility-features") @messages("using-service.app.on-your-device") }

diff --git a/conf/messages b/conf/messages index c151e8244..4f2d36b70 100644 --- a/conf/messages +++ b/conf/messages @@ -17,6 +17,8 @@ using-service.this-service-or-app-is-run=This {0} is run by HM Revenue and Custo using-service.service.this-means=This means you should be able to: using-service.app.this-means='This means you can use the built-in ' using-service.app.accessibility-features=accessibility features +using-service.app.accessibility-features.link.android=https://www.android.com/intl/en_uk/accessibility/ +using-service.app.accessibility-features.link.ios=https://www.apple.com/uk/accessibility/ using-service.app.on-your-device=' on your device to:' using-service.bullet1=change colours, contrast levels and fonts From 3d067298eccab980aa8551141c5fdda3f6982656 Mon Sep 17 00:00:00 2001 From: Nat Carey Date: Thu, 22 Apr 2021 16:29:11 +0100 Subject: [PATCH 2/2] PLATUI-1138: Testing that the link is included for the right platform. --- test/unit/views/StatementPageSpec.scala | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/test/unit/views/StatementPageSpec.scala b/test/unit/views/StatementPageSpec.scala index 1acb38081..4ce27618e 100644 --- a/test/unit/views/StatementPageSpec.scala +++ b/test/unit/views/StatementPageSpec.scala @@ -287,6 +287,36 @@ class StatementPageSpec extends WordSpec with Matchers with GuiceOneAppPerSuite """report the accessibility problem.""" ) } + + "return HTML including iOS specific link" in new Setup { + val statementPageHtml = statementPage( + fullyAccessibleIosAppStatement, + None, + isWelshTranslationAvailable = false + ) + + contentAsString(statementPageHtml) should include( + """href="https://www.apple.com/uk/accessibility/"""" + ) + + contentAsString(statementPageHtml) should not include + """href="https://www.android.com/intl/en_uk/accessibility/"""" + } + + "return HTML including Android specific link" in new Setup { + val statementPageHtml = statementPage( + fullyAccessibleAndroidAppStatement, + None, + isWelshTranslationAvailable = false + ) + + contentAsString(statementPageHtml) should include( + """href="https://www.android.com/intl/en_uk/accessibility/"""" + ) + + contentAsString(statementPageHtml) should not include + """href="https://www.apple.com/uk/accessibility/"""" + } } "Given an Accessibility Statement for a partially compliant app, rendering a Statement Page" should {