Skip to content

DRYD-1923: Accessibility > Resolve orphaned form labels (Criteria 3.3.2)#25

Open
spirosdi wants to merge 9 commits into
mainfrom
bugfix/dryd-1923
Open

DRYD-1923: Accessibility > Resolve orphaned form labels (Criteria 3.3.2)#25
spirosdi wants to merge 9 commits into
mainfrom
bugfix/dryd-1923

Conversation

@spirosdi
Copy link
Copy Markdown

What does this do?

  • It adds htmlFor and id props to Label. <label> includes both of them. In case of prebuilt Label, normalizeLabel clones and injects the props when not existing.
  • In case of <fieldset> components (CustomCompoundInput, RepeatingInput, TabularCompoundInput, InputTable), labelale forwards label as a prop instead of rendering and the component renders a <legend> element.
  • CheckboxInput: remove redundant wrapping
  • AutocompleteInput: forward id in read-only mode

Why are we doing this? (with JIRA link)
In the edit-record view there are a lot of orphaned labels (labels not associated to an input). The solution is to add a htmlFor label attribute pointing to a newly added input id. This task is only about fixing the orphaned labels. The missing labels, missing legend issues will be resolved in other tasks.

How should this be tested? Do these changes have associated tests?
Please follow test instructions here: collectionspace/cspace-ui.js#351

Dependencies for merging? Releasing to production?
N/A

Has the application documentation been updated for these changes?
Changelog has been updated

Did someone actually run this code to verify it works?
@spirosdi ran it locally

spirosdi added 9 commits May 7, 2026 12:13
…el to clone pre-built Labels including the new props; extended labelable to pass htmlFor and id to normalizeLabel;
…nd; updated labelable to pass label as an input when useLegend flag is true instead of rendering it;
…hat it renders a legend instead of an orphaned label; added id prop to children elements; updated repeatable to pass id as an input;
… propagate id through CustomCompoundInput.decorateInputs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants