From 32209224d57465954b32acb2789da93cd8327941 Mon Sep 17 00:00:00 2001 From: Quinten Steenhuis Date: Wed, 20 May 2026 13:44:56 -0400 Subject: [PATCH 1/2] Fix #1054 - add visually hidden document labels to buttons so style remains same but download/view buttons have semantic labels --- docassemble/AssemblyLine/al_document.py | 4 ++-- docassemble/AssemblyLine/data/questions/al_document.yml | 4 ++-- docassemble/AssemblyLine/data/questions/ql_baseline.yml | 6 ++++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docassemble/AssemblyLine/al_document.py b/docassemble/AssemblyLine/al_document.py index f88f3210..56b8b713 100644 --- a/docassemble/AssemblyLine/al_document.py +++ b/docassemble/AssemblyLine/al_document.py @@ -2224,7 +2224,7 @@ def download_list_html( download_doc.url_for( attachment=True, display_filename=download_filename ), - label=download_label, + label=f'{download_label} {title}', icon=download_icon, color="primary", size="md", @@ -2239,7 +2239,7 @@ def download_list_html( result["pdf"].url_for( attachment=False, display_filename=view_filename ), - label=view_label, + label=f'{view_label} {title}', icon=view_icon, color="secondary", size="md", diff --git a/docassemble/AssemblyLine/data/questions/al_document.yml b/docassemble/AssemblyLine/data/questions/al_document.yml index 3525c23a..1ca3204e 100644 --- a/docassemble/AssemblyLine/data/questions/al_document.yml +++ b/docassemble/AssemblyLine/data/questions/al_document.yml @@ -123,12 +123,12 @@ content: | generic object: ALDocumentBundle template: x.zip_label content: | - Download all + Download all ${ x.title } documents --- generic object: ALDocumentBundle template: x.full_pdf_label content: | - Download as one PDF + Download ${ x.title } as one PDF --- id: al exhibit ocr pages bg event: al_exhibit_ocr_pages diff --git a/docassemble/AssemblyLine/data/questions/ql_baseline.yml b/docassemble/AssemblyLine/data/questions/ql_baseline.yml index 5a94dc35..b10343bd 100644 --- a/docassemble/AssemblyLine/data/questions/ql_baseline.yml +++ b/docassemble/AssemblyLine/data/questions/ql_baseline.yml @@ -2668,8 +2668,10 @@ content: "Download" --- generic object: ALDocumentBundle template: x.send_label -content: "Send" +content: | + Send ${ x.title } documents --- generic object: ALDocumentBundle template: x.send_button_to_label -content: "Send" \ No newline at end of file +content: | + Send ${ x.title } documents \ No newline at end of file From 94a5e357333cee8033f27d50f6471c8416b58c88 Mon Sep 17 00:00:00 2001 From: Quinten Steenhuis Date: Wed, 20 May 2026 14:15:33 -0400 Subject: [PATCH 2/2] Correct default for standalone use of send_button_html() --- docassemble/AssemblyLine/al_document.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docassemble/AssemblyLine/al_document.py b/docassemble/AssemblyLine/al_document.py index 56b8b713..30f58627 100644 --- a/docassemble/AssemblyLine/al_document.py +++ b/docassemble/AssemblyLine/al_document.py @@ -2503,7 +2503,7 @@ def send_button_html( key: str = "final", show_editable_checkbox: bool = True, template_name: str = "", - label: str = "Send", + label: Optional[str] = None, icon: str = "envelope", preferred_formats: Optional[Union[str, List[str]]] = None, email_legend_class: str = "h4", @@ -2532,6 +2532,9 @@ def send_button_html( Returns: str: The generated HTML string for the input box and button. """ + if label is None: + label = str(self.send_label) or word("Send") + if not self.has_enabled_documents(): return "" # Don't let people email an empty set of documents