Skip to content

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

Merged
spirosdi merged 4 commits into
developfrom
bugfix/dryd-1923
May 20, 2026
Merged

DRYD-1923: Accessibility > Resolve orphaned form labels (Criteria 3.3.2)#351
spirosdi merged 4 commits into
developfrom
bugfix/dryd-1923

Conversation

@spirosdi
Copy link
Copy Markdown
Contributor

@spirosdi spirosdi commented May 11, 2026

What does this do?

  • Added inputHelper.buildInputId that builds a unique id per field based on recordType, formName, path. F.e for the identificationNumber of the default form, the built id is cspace-collectionobject-default-document-ns2_collectionobjects_common-objectNumber. The cspace prefix is also used in css classes and its purpose is to isolate the namespace.
  • Added using it in Field, InputTable, *HierarchyEditor for setting input id and label htmlFor.

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?

  1. Build locally the cspace-input PR: DRYD-1923: Accessibility > Resolve orphaned form labels (Criteria 3.3.2) cspace-input.js#25
  2. The cspace-ui build should include the cspace-input from step 1. I do it by changing the cspace-ui package.json cspace-input property to point to the locally cspace-input build f.e: "cspace-input": "file:../cspace-input.js". But there should also be other ways to set this up (like using symlink).
  3. Start the local cspace-ui devserver and using the https://chromewebstore.google.com/detail/wave-evaluation-tool/jbbplnpkjmmeebjpijfedlgcdilocofh confirm that there are no more "Missing form label" errors in the edit record view. You can compare to the WAVE evaluation of the cspace-ui version deployed to core.dev

Dependencies for merging? Releasing to production?
Depends on cspace-input PR: collectionspace/cspace-input.js#25. Please merge the PR after the cspace-input PR is merged, the new npmjs version is published and the cspace-ui package.json is updated accordingly.

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

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

Have any new accessibility violations been handled?
No new violations

Copy link
Copy Markdown
Contributor

@mikejritter mikejritter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran this locally and see:

  • Compound inputs switched from dev to fieldsets
  • Legends applied to fieldsets
  • New label ids/htmlFor being applied to labels

Also checked that tests are passing

@spirosdi spirosdi merged commit ef54ac1 into develop May 20, 2026
5 checks passed
@spirosdi spirosdi deleted the bugfix/dryd-1923 branch May 20, 2026 07:21
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