From 7583c8d9faacf3cfbea3b1a525a4ec1806c93b58 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Fri, 12 Mar 2021 17:12:47 +0000 Subject: [PATCH] Remove redundant hidden H3s This commit replaces the H3s which only repeated information with some hidden text that will make it read nicer for screenreaders. --- app/templates/views/performance.html | 7 +++---- app/templates/views/signedout.html | 5 +++-- tests/app/main/views/test_index.py | 5 +---- tests/app/main/views/test_performance.py | 5 +---- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/app/templates/views/performance.html b/app/templates/views/performance.html index 663db2f46..d8ad5e34a 100644 --- a/app/templates/views/performance.html +++ b/app/templates/views/performance.html @@ -21,7 +21,6 @@
-

Total messages

{{ total_notifications|format_billions }}
total
@@ -88,7 +87,6 @@
-

Average

{{ big_number( '{:.1f}%'.format(average_percentage_under_10_seconds), label='on average', @@ -122,14 +120,15 @@
-

Organisations

+ There are
{{ count_of_live_services_and_organisations.organisations|format_thousands }}
organisations
-

Services

+ and
{{ count_of_live_services_and_organisations.services|format_thousands }}
services + using Notify.
diff --git a/app/templates/views/signedout.html b/app/templates/views/signedout.html index 3214b3e95..c90321418 100644 --- a/app/templates/views/signedout.html +++ b/app/templates/views/signedout.html @@ -123,14 +123,15 @@

Who’s using GOV.UK Notify

-

Organisations

+ There are
{{ counts.organisations|format_thousands }}
organisations
-

Services

+ and
{{ counts.services|format_thousands }}
services + using Notify.

diff --git a/tests/app/main/views/test_index.py b/tests/app/main/views/test_index.py index db21a84bc..998ef65d5 100644 --- a/tests/app/main/views/test_index.py +++ b/tests/app/main/views/test_index.py @@ -34,10 +34,7 @@ def test_non_logged_in_user_can_see_homepage( assert normalize_spaces(page.select_one('#whos-using-notify').text) == ( 'Who’s using GOV.UK Notify ' - 'Organisations ' - '111 organisations ' - 'Services ' - '9,999 services ' + 'There are 111 organisations and 9,999 services using Notify. ' 'See the list of services and organisations.' ) assert page.select_one('#whos-using-notify a')['href'] == url_for( diff --git a/tests/app/main/views/test_performance.py b/tests/app/main/views/test_performance.py index 7a544e6f0..17519a7a9 100644 --- a/tests/app/main/views/test_performance.py +++ b/tests/app/main/views/test_performance.py @@ -116,7 +116,6 @@ def test_should_render_performance_page( 'Performance data ' '' 'Messages sent since May 2016 ' - 'Total messages ' '1.8 billion total ' '1.1 billion emails ' '987.7 million text messages ' @@ -134,7 +133,6 @@ def test_should_render_performance_page( 'Only showing the last 7 days ' '' 'Messages sent within 10 seconds ' - 'Average ' '96.8% on average ' 'Messages sent within 10 seconds ' 'Date Percentage ' @@ -148,8 +146,7 @@ def test_should_render_performance_page( 'Only showing the last 7 days ' '' 'Organisations using Notify ' - 'Organisations 111 organisations ' - 'Services 9,999 services ' + 'There are 111 organisations and 9,999 services using Notify. ' 'Organisations using Notify ' 'Organisation Number of live services ' 'Department of Examples and Patterns 2 '