Skip to content

Converter parameter controls are not associated with their visible labels #2506

Description

@romanlutz

Describe the bug

Converter parameter forms render each parameter name visibly, but do not programmatically associate that name with its textbox, switch, choice, or file control. Screen readers therefore announce only a placeholder, value/state, or generic control role instead of the parameter being edited.

This was reproduced across the shared renderer with:

  • SATAMaskingConverter: mask_token, num_masks, skip_first, and min_word_length
  • VigenereConverter: text parameter key and boolean parameter append_description
  • DigitBijectionConverter, LetterBijectionConverter, TokenBijectionConverter, and PuzzledConverter parameters

The visual name is emitted in an unassociated <span>, followed by the control:

This affects the tested intent of WCAG 1.3.1 (Info and Relationships), 3.3.2 (Labels or Instructions), and 4.1.2 (Name, Role, Value).

A robust fix should associate the existing visible label through Fluent Field, <label for>/id, or aria-labelledby rather than adding a divergent hidden name. Required/error/help text should remain programmatically connected, and role/name tests should cover text, boolean, choice, and file variants.

Steps/Code to Reproduce

  1. Activate any writable text target and open Chat.
  2. Enter a prompt and open the converter panel.
  3. Select VigenereConverter and expand Parameters.
  4. Inspect the accessibility tree for key and append_description.
  5. Repeat with SATAMaskingConverter or one of the Bijection/Puzzled converters.

Observed accessibility snapshots:

Visible label: key
Accessible node: textbox

Visible label: append_description
Accessible node: switch "False"

Visible label: mask_token
Accessible node: textbox "[MASK]"

Visible label: num_masks
Accessible node: textbox

Expected Results

Each control's accessible name matches its visible parameter label. For example, the tree exposes textbox "key", switch "append_description", and textbox "num_masks"; required state, errors, descriptions, and boolean state remain available separately.

Automated tests query each supported parameter-control variant by role and visible name.

Actual Results

Text controls are announced using only a placeholder when one exists, otherwise as unnamed textbox controls. Boolean controls are announced only by their current True/False state. Multiple adjacent parameters are therefore indistinguishable to a screen-reader user.

The converted-prompt editor itself remains correctly named Converted prompt; this is a separate shared parameter-renderer defect and is not covered by closed issue #2440 / merged PR #2465.

Screenshots

N/A. Accessibility-tree output is included in the reproduction above.

Versions

  • OS: Windows_NT
  • Browser: Playwright Chromium (@playwright/test 1.62.1)
  • Python: 3.14.4
  • PyRIT: 1.1.0.dev0, main at e9277c45ab136b39f9aca12745bb45746f7d9963
  • Python package versions: repository uv.lock at the tested commit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions