Skip to content

Fix accessibility issues with placeholder text in submission forms by removing placeholders#4199

Merged
tdonohue merged 18 commits intoDSpace:mainfrom
4Science:task/main/DURACOM-347
Apr 6, 2026
Merged

Fix accessibility issues with placeholder text in submission forms by removing placeholders#4199
tdonohue merged 18 commits intoDSpace:mainfrom
4Science:task/main/DURACOM-347

Conversation

@FrancescoMolinaro
Copy link
Copy Markdown
Contributor

@FrancescoMolinaro FrancescoMolinaro commented Apr 16, 2025

References

Fixes #4198

Description

Following what is described in https://www.deque.com/blog/accessible-forms-the-problem-with-placeholders/ as an issue with placeholder, this PR removes all placeholders on submission form fields (replacing them with labels where needed)

Instructions for Reviewers

Placeholders should no longer exist on any fields within the submission form. The Series/Report No. field now has sublabels.

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@tdonohue tdonohue changed the title Task/main/duracom 347 Fix accessibility issues with placeholder text in submission forms Apr 16, 2025
@tdonohue tdonohue added accessibility component: submission 1 APPROVAL pull request only requires a single approval to merge labels Apr 16, 2025
@tdonohue tdonohue moved this to 🙋 Needs Reviewers Assigned in DSpace 9.0 Release Apr 16, 2025
@tdonohue
Copy link
Copy Markdown
Member

Temporarily closing & reopening this PR to trigger tests to run again. The e2e test failures currently in this PR seem unrelated to the PR itself, and I'm hoping reopening this PR will get this to run against latest main.

@tdonohue tdonohue closed this May 14, 2025
@github-project-automation github-project-automation Bot moved this from 🙋 Needs Reviewers Assigned to ✅ Done in DSpace 9.0 Release May 14, 2025
@tdonohue tdonohue reopened this May 14, 2025
@tdonohue tdonohue moved this from ✅ Done to 🙋 Needs Reviewers Assigned in DSpace 9.0 Release May 14, 2025
@tdonohue
Copy link
Copy Markdown
Member

@FrancescoMolinaro : Just a note this PR seems to be failing the automated accessibility scan that is done in e2e tests. The failure is in the Submission Form and it says this:

1 accessibility violation was detected
[
  {
    id: 'label',
    impact: 'critical',
    description: 'Ensure every form element has a label',
    helpUrl: 'https://dequeuniversity.com/rules/axe/4.10/label?application=axeAPI',
    nodes: 4,
    html: [
      '<input class="form-control ng-untouched ng-pristine ng-valid ng-star-inserted" autocomplete="on" id="6_array-0-dc_contributor_author" name="dc.contributor.author" placeholder="" spellcheck="true" tabindex="0" type="text">',
      '<input class="form-control ng-untouched ng-pristine ng-valid ng-star-inserted" autocomplete="on" id="9_array-0-dc_title_alternative" name="dc.title.alternative" placeholder="" spellcheck="true" tabindex="0" type="text">',
      '<input class="form-control ds-form-input-value ng-untouched ng-pristine ng-valid ng-star-inserted" autocomplete="on" id="15_array-0-dc_identifier_QUALDROP_VALUE" name="dc.identifier_QUALDROP_VALUE" placeholder="" spellcheck="false" tabindex="0" type="text">',
      '<input _ngcontent-dspace-angular-c4223387587="" class="form-control scrollable-dropdown-input" id="17_array-0-dc_type" name="dc.type" readonly="" type="text" aria-controls="combobox_17_array-0-dc_type_listbox" autocomplete="off">'
    ]
  }
]
    (Attempt 1 of 3) should create a new submission when using /submit path & pass accessibility

@github-actions
Copy link
Copy Markdown

Hi @FrancescoMolinaro,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@tdonohue tdonohue moved this to 🙋 Needs Reviewers Assigned in DSpace 10.0 Release May 19, 2025
@FrancescoMolinaro
Copy link
Copy Markdown
Contributor Author

Hi @tdonohue , sorry for the delay on this one, I have adapted the code to handle also the native components from the form library, the PR should be ready now.

@tdonohue tdonohue moved this from 🙋 Needs Reviewers Assigned to 👀 Under Review in DSpace 10.0 Release Oct 30, 2025
@tdonohue tdonohue changed the title Fix accessibility issues with placeholder text in submission forms Fix accessibility issues with placeholder text in submission forms by removing placeholders Feb 16, 2026
Copy link
Copy Markdown
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

👍 Thanks @FrancescoMolinaro ! I retested this today and, as expected, I see that all placeholder text is now removed from the submission form. I didn't notice any side effects to that change. I also feel this is the easiest way to fix the ongoing issues with accessibility of placeholder text.

NOTE: Unfortunately, this won't be possible to backport until #4777 is backported (as that related fix hasn't been backported yet).

@github-project-automation github-project-automation Bot moved this from 👀 Under Review to 👍 Reviewer Approved in DSpace 10.0 Release Feb 16, 2026
@github-actions
Copy link
Copy Markdown

Hi @FrancescoMolinaro,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@github-actions
Copy link
Copy Markdown

Hi @FrancescoMolinaro,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 2, 2026

Hi @FrancescoMolinaro,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

Copy link
Copy Markdown
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

👍 Thanks @FrancescoMolinaro ! I retested this today and it's looking good. Since #4777 was backported to 9.x and 8.x, I'd like to also backport these accessibility fixes to dspace-9_x and dspace-8_x branches as well.

Merging with one approval & flagging for auto-backport

@tdonohue tdonohue added port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release labels Apr 6, 2026
@tdonohue tdonohue added this to the 10.0 milestone Apr 6, 2026
@tdonohue tdonohue merged commit 15079ce into DSpace:main Apr 6, 2026
18 of 19 checks passed
@github-project-automation github-project-automation Bot moved this from 👍 Reviewer Approved to ✅ Done in DSpace 10.0 Release Apr 6, 2026
@dspace-bot
Copy link
Copy Markdown
Contributor

Backport failed for dspace-8_x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin dspace-8_x
git worktree add -d .worktree/backport-4199-to-dspace-8_x origin/dspace-8_x
cd .worktree/backport-4199-to-dspace-8_x
git switch --create backport-4199-to-dspace-8_x
git cherry-pick -x 8a2aa4641777be5a22b4b967a043c282b7d1ff49 800a9b5a281572e2a8c0de8753d6f1b67b48ad53 4bf7bedf96d07bed89243b0e0b1a14568f5dbdf4 ef8590f28bdd78cb7158405a0cc35feed9bc8c90 4139d3574271d6c58957002f587d2dc8792a43c3 e560bb485b84c868addd529b38e8182be6a94e13 044da75b001212291e5dffeae9350a307d818ce9 68dd890324dba7efd0e60edfa390673dd61e6189 4680a001b52b54bd4dfddd1f1187e32e5ccb52ae a448157eefaaa0e7fcadf134254e1c4e40a709ba

@dspace-bot
Copy link
Copy Markdown
Contributor

Backport failed for dspace-9_x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin dspace-9_x
git worktree add -d .worktree/backport-4199-to-dspace-9_x origin/dspace-9_x
cd .worktree/backport-4199-to-dspace-9_x
git switch --create backport-4199-to-dspace-9_x
git cherry-pick -x 8a2aa4641777be5a22b4b967a043c282b7d1ff49 800a9b5a281572e2a8c0de8753d6f1b67b48ad53 4bf7bedf96d07bed89243b0e0b1a14568f5dbdf4 ef8590f28bdd78cb7158405a0cc35feed9bc8c90 4139d3574271d6c58957002f587d2dc8792a43c3 e560bb485b84c868addd529b38e8182be6a94e13 044da75b001212291e5dffeae9350a307d818ce9 68dd890324dba7efd0e60edfa390673dd61e6189 4680a001b52b54bd4dfddd1f1187e32e5ccb52ae a448157eefaaa0e7fcadf134254e1c4e40a709ba

@tdonohue
Copy link
Copy Markdown
Member

tdonohue commented Apr 6, 2026

@FrancescoMolinaro : This was unable to be auto-backported to dspace-9_x or dspace-8_x. If you have time, I'd like to get this minimally backported to 9.x, as that's our current supported release. Thanks!

@FrancescoMolinaro
Copy link
Copy Markdown
Contributor Author

Hi @tdonohue , I have manually ported to both 9 and 8, you can find the PRs at the following links:

8 - #5445
9 -#5447

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

Labels

1 APPROVAL pull request only requires a single approval to merge accessibility component: submission port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Make presence of placeholders in submission configurable and hide placeholders by default; to avoid accessibility issues

4 participants