From a217fd6b053076be28f225ebe1c2f7148b62f0b5 Mon Sep 17 00:00:00 2001
From: Tom Byers
Date: Thu, 22 Oct 2020 14:18:53 +0100
Subject: [PATCH 1/2] Remove issue with CSV table for low vision users
The following issues were raised with the table
that replays CSV data to users:
1. the table could not be located by low vision
users using the reflow technique
2. the content should be presented in a single
column when the reflow technique is used
Number 2. came from the Web Content Accessibility
guidelines (WCAG) success criteria 1.4.10 Reflow.
I wasn't able to reproduce number 1. so asked the
Digital Accessibility Centre (DAC), who tested it
originally, for help. Tom Shaw from DAC kindly
retested it and found the problem was gone so I am
considering it fixed.
I am treating number 2. as a misinterpretation of
the success criteria as it lists data tables as an
exception to the rule:
"Except for parts of the content which require
two-dimensional layout for usage or meaning.
...Examples of content which requires
two-dimensional layout are images, maps, diagrams,
video, games, presentations, data tables, and
interfaces where it is necessary to keep toolbars
in view while manipulating content."
The full page is here:
https://www.w3.org/WAI/WCAG21/Understanding/reflow.html
---
app/templates/views/accessibility_statement.html | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/app/templates/views/accessibility_statement.html b/app/templates/views/accessibility_statement.html
index 4afdbe9d7..8160ba203 100644
--- a/app/templates/views/accessibility_statement.html
+++ b/app/templates/views/accessibility_statement.html
@@ -38,7 +38,6 @@
We know some parts of this website are not fully accessible:
- - low vision users cannot access the table we use to show CSV data when viewed at high zoom
- screen reader users may find the process of moving templates and folders confusing
- one page links to a PDF document that is not fully accessible
- the Notify status page has several accessibility issues
@@ -96,10 +95,6 @@
Non compliance with the accessibility regulations
-
- Low vision users cannot access the table we use to show CSV data when viewed at high zoom. This fails WCAG 1.4.10 success criteria (Reflow). We plan to fix this by the end of 2020.
-
-
Screen reader users may find the process of moving templates and folders confusing. This fails WCAG 4.1.2 success criteria (Name, role, value). We plan to fix this by November 2020.
@@ -168,6 +163,6 @@
- This statement was prepared on 23 September 2020. It was last reviewed on 9 October 2020.
+ This statement was prepared on 23 September 2020. It was last reviewed on 22 October 2020.
{% endblock %}
From 1d7e4aa94288db515a673f223e4b4488a80580be Mon Sep 17 00:00:00 2001
From: Tom Byers
Date: Thu, 22 Oct 2020 15:33:28 +0100
Subject: [PATCH 2/2] Add test for accessibility statement last review
This is a proposal of a way to test that changes
to this page include updates to the 'last
reviewed' date, if needed.
---
tests/app/test_accessibility_statement.py | 24 +++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 tests/app/test_accessibility_statement.py
diff --git a/tests/app/test_accessibility_statement.py b/tests/app/test_accessibility_statement.py
new file mode 100644
index 000000000..d18f28d7d
--- /dev/null
+++ b/tests/app/test_accessibility_statement.py
@@ -0,0 +1,24 @@
+import re
+import subprocess
+from datetime import datetime
+
+
+def test_last_review_date():
+ statement_file_path = "app/templates/views/accessibility_statement.html"
+
+ # test local changes against master for a full diff of what will be merged
+ statement_diff = subprocess.run([f"git diff --exit-code origin/master -- {statement_file_path}"],
+ stdout=subprocess.PIPE, shell=True)
+
+ # if statement has changed, test the review date was part of those changes
+ if statement_diff.returncode == 1:
+ raw_diff = statement_diff.stdout.decode('utf-8')
+ today = datetime.now().strftime('%d %B %Y')
+ with open(statement_file_path, 'r') as statement_file:
+ current_review_date = re.search((r'This statement was prepared on 23 September 2020\. '
+ r'It was last reviewed on (\d{1,2} [A-Z]{1}[a-z]+ \d{4})'),
+ statement_file.read()).group(1)
+
+ # guard against changes that don't need to update the review date
+ if current_review_date != today:
+ assert 'This statement was prepared on 23 September 2020. It was last reviewed on' in raw_diff