From e222db530a6e7dda9dab640d6b72d5c45264470b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 1 May 2026 19:21:17 +0000 Subject: [PATCH 1/2] Initial plan From 74729c6d42f2c9673c7b8f7fcffa0f8f55432a19 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 1 May 2026 19:24:12 +0000 Subject: [PATCH 2/2] Skip dynamic code fields in multifield no-label accessibility check Agent-Logs-Url: https://github.com/SuffolkLITLab/DAYamlChecker/sessions/d1322216-aff4-435b-918c-362029af4c35 Co-authored-by: nonprofittechy <7645641+nonprofittechy@users.noreply.github.com> --- src/dayamlchecker/accessibility.py | 2 ++ tests/test_yaml_structure.py | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/dayamlchecker/accessibility.py b/src/dayamlchecker/accessibility.py index e9e1144..15807fc 100644 --- a/src/dayamlchecker/accessibility.py +++ b/src/dayamlchecker/accessibility.py @@ -220,6 +220,8 @@ def _check_multifield_no_label_usage( findings: list[AccessibilityFinding] = [] for field in fields: + if "code" in field: + continue field_line = ( document_start_line + field.get("__line__", doc.get("__line__", 1)) - 1 ) diff --git a/tests/test_yaml_structure.py b/tests/test_yaml_structure.py index 3598c4b..0a9922a 100644 --- a/tests/test_yaml_structure.py +++ b/tests/test_yaml_structure.py @@ -573,6 +573,28 @@ def test_accessibility_no_label_false_does_not_count_as_label(self): f"Expected missing-label accessibility error, got: {errs}", ) + def test_accessibility_dynamic_code_field_no_error_on_multi_field_screen(self): + yaml_content = """id: court county +question: | + Court +fields: + - code: | + dynamic_fields() + - What is the court county?: court_county + choices: + - Contra Costa + - Alameda +""" + errs = find_errors_from_string( + yaml_content, + input_file="", + lint_mode="accessibility", + ) + self.assertFalse( + any("single-field screens" in e.err_str.lower() for e in errs), + f"Did not expect no-label accessibility error for dynamic code field, got: {errs}", + ) + def test_accessibility_tagged_pdf_info_for_docx_without_setting(self): yaml_content = """attachments: - name: Letter