From 4d0d92f82579846efb732168fd774a0aaf940df3 Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Fri, 1 Nov 2024 11:47:25 -0700 Subject: [PATCH 1/3] added attributes for a11y --- .../views/templates/_template_list.html | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/app/templates/views/templates/_template_list.html b/app/templates/views/templates/_template_list.html index 6f161c4a7..9e013f87b 100644 --- a/app/templates/views/templates/_template_list.html +++ b/app/templates/views/templates/_template_list.html @@ -38,22 +38,28 @@ {% for item in template_list %} {% set item_link_content %} - {% if item.is_folder %} - - {{- format_item_name(item.name) -}} - - {% elif not item.ancestors %} - - - {%- if current_service.api_keys -%} - - {%- endif -%} - {{- format_item_name(item.name) -}} - - - {% endif %} + {% if item.is_folder %} + + {{- format_item_name(item.name) -}} + + {% elif not item.ancestors %} + + + {%- if current_service.api_keys -%} + + {%- endif -%} + {{- format_item_name(item.name) -}} + + + {% endif %} {% endset %} {% set label_content %} @@ -82,6 +88,8 @@ "id": "templates-or-folder-" ~ item.id, "classes": "template-list-item template-list-item-with-checkbox {}".format( "template-list-item-hidden-by-default" if item.ancestors else "template-list-item-without-ancestors"), + "attributes": { "role": "checkbox", "aria-describedby": item.id ~ "-item-hint" }, + "after": item_link_content ~ item_meta } %} {% set _ = checkboxes_data.append(checkbox_config) %} From 334cd4041a06c61d9e955520b18e6f92ac943359 Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Fri, 1 Nov 2024 12:00:00 -0700 Subject: [PATCH 2/3] fixed managed folder position --- app/templates/views/templates/choose.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/views/templates/choose.html b/app/templates/views/templates/choose.html index e1e99f527..964ab10dc 100644 --- a/app/templates/views/templates/choose.html +++ b/app/templates/views/templates/choose.html @@ -33,7 +33,7 @@ {% else %} -
+
@@ -51,7 +51,7 @@
{% if current_user.has_permissions('manage_templates') and current_template_folder_id and user_has_template_folder_permission %} {% endif %}
From 66d18ced105d7a63b0403036291c4c3a5ff9a3c5 Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Fri, 1 Nov 2024 12:16:22 -0700 Subject: [PATCH 3/3] fixed testing --- app/templates/views/templates/_template_list.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/views/templates/_template_list.html b/app/templates/views/templates/_template_list.html index 9e013f87b..c80a5c5a2 100644 --- a/app/templates/views/templates/_template_list.html +++ b/app/templates/views/templates/_template_list.html @@ -43,7 +43,7 @@ class="usa-link template-list-folder" tabindex="0" role="link" - aria-label="{{ format_item_name(item.name) }}"> + aria-label="{{ item.name }}"> {{- format_item_name(item.name) -}} {% elif not item.ancestors %} @@ -51,7 +51,7 @@ class="usa-link template-list-template" tabindex="0" role="link" - aria-label="{{ format_item_name(item.name) }}"> + aria-label="{{ item.name }}"> {%- if current_service.api_keys -%}