From 5227a48a66614cf1d17bdc7105bbc40c71ebb2d7 Mon Sep 17 00:00:00 2001 From: Cooper Date: Wed, 25 Jan 2017 16:05:54 -0500 Subject: [PATCH 01/11] Attempt to add unique item ID to input Mostly testing this as a proof of concept, each input in our forms should have a unique ID, so that the form labels can be linked to them. --- templates/partials/result_item/table_header.php | 2 +- templates/partials/results_items.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/partials/result_item/table_header.php b/templates/partials/result_item/table_header.php index ed8e2191a..6db7b0b15 100644 --- a/templates/partials/result_item/table_header.php +++ b/templates/partials/result_item/table_header.php @@ -21,7 +21,7 @@

Select which part of the table to convert to a header

- diff --git a/templates/partials/results_items.php b/templates/partials/results_items.php index bf4eab095..df0f8f4b5 100644 --- a/templates/partials/results_items.php +++ b/templates/partials/results_items.php @@ -145,7 +145,7 @@ } if ( ! empty($result_template)) { - echo($this->fetch("partials/result_item/{$result_template}", ['group_item' => $group_item])); + echo($this->fetch("partials/result_item/{$result_template}", ['group_item' => $group_item, 'item_id' => $li_id])); } ?> From c45e72ff56b44416f4d64c4a267a89fce9345d0e Mon Sep 17 00:00:00 2001 From: Cooper Date: Wed, 25 Jan 2017 16:16:58 -0500 Subject: [PATCH 02/11] Add label that references our new dynamic ID --- templates/partials/result_item/table_header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/partials/result_item/table_header.php b/templates/partials/result_item/table_header.php index 6db7b0b15..10c138de4 100644 --- a/templates/partials/result_item/table_header.php +++ b/templates/partials/result_item/table_header.php @@ -19,7 +19,7 @@ */ ?>
-

Select which part of the table to convert to a header

+
+ + -   - +   +  
From 628c6e52bb5ad96de13af8f3e6d94230442ee25e Mon Sep 17 00:00:00 2001 From: Cooper Date: Wed, 25 Jan 2017 16:47:28 -0500 Subject: [PATCH 04/11] Add label for missing header text error --- templates/partials/result_item/header_text.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/partials/result_item/header_text.php b/templates/partials/result_item/header_text.php index 15fb7ea4a..bcf8408b8 100644 --- a/templates/partials/result_item/header_text.php +++ b/templates/partials/result_item/header_text.php @@ -19,7 +19,8 @@ */ ?>
- + +
From 2b752b1f8407a1b3861d24358dd17a368b3a9451 Mon Sep 17 00:00:00 2001 From: Cooper Date: Wed, 25 Jan 2017 16:56:37 -0500 Subject: [PATCH 05/11] Adjust layout to hide the label when not required We are adding the labels for screen readers, but in many cases, the placeholder text is good enough for operation when the labels are not needed for sighted individuals. --- templates/partials/result_item/header_text.php | 2 +- templates/partials/result_item/table_header.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/partials/result_item/header_text.php b/templates/partials/result_item/header_text.php index bcf8408b8..33611563e 100644 --- a/templates/partials/result_item/header_text.php +++ b/templates/partials/result_item/header_text.php @@ -19,7 +19,7 @@ */ ?>
- +
diff --git a/templates/partials/result_item/table_header.php b/templates/partials/result_item/table_header.php index 10c138de4..87a08c8d1 100644 --- a/templates/partials/result_item/table_header.php +++ b/templates/partials/result_item/table_header.php @@ -19,8 +19,8 @@ */ ?>
-
+ + From 7f34c0d68a6a6544dcaeed2107b858831bbfbfd2 Mon Sep 17 00:00:00 2001 From: Cooper Date: Wed, 25 Jan 2017 17:05:18 -0500 Subject: [PATCH 07/11] Add form labels to the link and link_text templates Note that these appear to be duplicative templates and one can probably be removed, but look at the results_items.php statement to be sure. --- templates/partials/result_item/link.php | 3 ++- templates/partials/result_item/link_text.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/partials/result_item/link.php b/templates/partials/result_item/link.php index d0deab462..f019a5ba8 100644 --- a/templates/partials/result_item/link.php +++ b/templates/partials/result_item/link.php @@ -19,7 +19,8 @@ */ ?>
- + +
diff --git a/templates/partials/result_item/link_text.php b/templates/partials/result_item/link_text.php index 72c3e7d21..788a55f6d 100644 --- a/templates/partials/result_item/link_text.php +++ b/templates/partials/result_item/link_text.php @@ -19,7 +19,8 @@ */ ?>
- + +
From 3cff78a5af8a9510af16ffd770c7e48fe61288a6 Mon Sep 17 00:00:00 2001 From: Cooper Date: Wed, 25 Jan 2017 17:07:43 -0500 Subject: [PATCH 08/11] Add form label This template also appears to be duplicative, like the link and link_text templates. In fact, according to the switch statement in results_items.php, this case would never be reached, since "aSuspiciousLinkText" would be twice before this template is ever used (lines 103 and 120 in that file) --- templates/partials/result_item/suspicious_link_text.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/partials/result_item/suspicious_link_text.php b/templates/partials/result_item/suspicious_link_text.php index f468c97e1..a29a5cf73 100644 --- a/templates/partials/result_item/suspicious_link_text.php +++ b/templates/partials/result_item/suspicious_link_text.php @@ -19,7 +19,8 @@ */ ?>
- + + From 659eec403449272537439d372c09b78b28a1efd1 Mon Sep 17 00:00:00 2001 From: Cooper Date: Wed, 25 Jan 2017 17:11:44 -0500 Subject: [PATCH 09/11] Add form label to thead scope This one needs a visible label, so it lives outside the form group, per: http://getbootstrap.com/components/#input-groups-basic --- templates/partials/result_item/table_header_scope.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/partials/result_item/table_header_scope.php b/templates/partials/result_item/table_header_scope.php index 74316392e..bce5b779f 100644 --- a/templates/partials/result_item/table_header_scope.php +++ b/templates/partials/result_item/table_header_scope.php @@ -18,8 +18,9 @@ * Primary Author Contact: Jacob Bates */ ?> +
- From b04621442ede157ac4071de1833d140ea4cfd225 Mon Sep 17 00:00:00 2001 From: Cooper Date: Wed, 25 Jan 2017 17:21:59 -0500 Subject: [PATCH 10/11] Ensure input ID's are actually unique Was using the item_id passed from earlier on in the templating process, but that same ID is put on the
  • item to enable collapsing of results. --- templates/partials/result_item/header_text.php | 4 ++-- templates/partials/result_item/image_alt.php | 4 ++-- templates/partials/result_item/link.php | 4 ++-- templates/partials/result_item/link_text.php | 4 ++-- templates/partials/result_item/suspicious_link_text.php | 2 +- templates/partials/result_item/table_header.php | 4 ++-- templates/partials/result_item/table_header_scope.php | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/templates/partials/result_item/header_text.php b/templates/partials/result_item/header_text.php index 33611563e..d4501426b 100644 --- a/templates/partials/result_item/header_text.php +++ b/templates/partials/result_item/header_text.php @@ -19,8 +19,8 @@ */ ?>
    - - + +
    diff --git a/templates/partials/result_item/image_alt.php b/templates/partials/result_item/image_alt.php index 7ee95745a..c99457e12 100644 --- a/templates/partials/result_item/image_alt.php +++ b/templates/partials/result_item/image_alt.php @@ -19,9 +19,9 @@ */ ?>
    - + 100 - + diff --git a/templates/partials/result_item/link.php b/templates/partials/result_item/link.php index f019a5ba8..d3730811a 100644 --- a/templates/partials/result_item/link.php +++ b/templates/partials/result_item/link.php @@ -19,8 +19,8 @@ */ ?>
    - - + +
    diff --git a/templates/partials/result_item/link_text.php b/templates/partials/result_item/link_text.php index 788a55f6d..4ad859dfa 100644 --- a/templates/partials/result_item/link_text.php +++ b/templates/partials/result_item/link_text.php @@ -19,8 +19,8 @@ */ ?>
    - - + +
    diff --git a/templates/partials/result_item/suspicious_link_text.php b/templates/partials/result_item/suspicious_link_text.php index a29a5cf73..0875ceeda 100644 --- a/templates/partials/result_item/suspicious_link_text.php +++ b/templates/partials/result_item/suspicious_link_text.php @@ -19,7 +19,7 @@ */ ?>
    - + diff --git a/templates/partials/result_item/table_header.php b/templates/partials/result_item/table_header.php index 87a08c8d1..7090de6c3 100644 --- a/templates/partials/result_item/table_header.php +++ b/templates/partials/result_item/table_header.php @@ -20,8 +20,8 @@ ?>
    - - diff --git a/templates/partials/result_item/table_header_scope.php b/templates/partials/result_item/table_header_scope.php index bce5b779f..c57aaea45 100644 --- a/templates/partials/result_item/table_header_scope.php +++ b/templates/partials/result_item/table_header_scope.php @@ -18,7 +18,7 @@ * Primary Author Contact: Jacob Bates */ ?> - +
    +   diff --git a/templates/partials/result_item/table_header_scope.php b/templates/partials/result_item/table_header_scope.php index c57aaea45..94af79a9d 100644 --- a/templates/partials/result_item/table_header_scope.php +++ b/templates/partials/result_item/table_header_scope.php @@ -20,7 +20,7 @@ ?>
    -