Skip to content

SorobanPanel args textarea has no accessible label association via htmlFor #543

Description

@k-deejah

Problem

src/components/SorobanPanel.tsx renders a <textarea> for the JSON arguments input, but uses a plain <label> element that is not programmatically associated with the textarea. The label text "Arguments (JSON array)" is rendered as a <label className="..."> without an htmlFor attribute, and the textarea has no id attribute.

A second related problem: the src/components/ui/Input.tsx component correctly associates labels via auto-generated id from the label text, but the SorobanPanel bypasses the Input component and uses a raw <textarea> — so the label association logic is never applied.

Without a programmatic label association, screen readers will announce the textarea as "unlabeled text area". Users who rely on screen readers or voice control software will have no context for what the field expects.

Solution

Either add matching id and htmlFor attributes to wire the label to the textarea, or create a Textarea component in src/components/ui/ that mirrors the label-association logic from Input.tsx.

Acceptance Criteria

  • The Arguments textarea has an id attribute
  • The label element has a matching htmlFor attribute pointing to the textarea id
  • A screen reader announces the textarea as "Arguments (JSON array)" when focused
  • The error message (if any) is also associated via aria-describedby
  • Optionally, a reusable Textarea component is added to src/components/ui/

Note for Contributors: If you are assigned to this issue, write a clear and detailed description for your pull request. Explain what was changed, why it was needed, how it was implemented, and include any relevant testing or screenshots where applicable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilityA11y, ARIA, keyboard navigation, screen readersfrontendUI, component, or visual layer concern

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions