Fix accessibility issues with placeholder text in submission forms by removing placeholders#4199
Fix accessibility issues with placeholder text in submission forms by removing placeholders#4199FrancescoMolinaro wants to merge 18 commits intoDSpace:mainfrom
Conversation
…ngly used placeholder in date legend
|
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 |
|
@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: |
|
Hi @FrancescoMolinaro, |
|
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. |
|
Hi @FrancescoMolinaro, |
tdonohue
left a comment
There was a problem hiding this comment.
@FrancescoMolinaro : I'm looking at this after having reviewed #4777 from @AndreaBarbasso , and I feel this two PRs have slight conflicts.
In #4777, we have added labels to fields (like dates) which used the placeholder as a "label". This removes the usefulness of the placeholders on date fields.
So, arguably once those fields have labels, we could just remove their placeholders(which is what is recommended in https://www.deque.com/blog/accessible-forms-the-problem-with-placeholders/). That'd simplify things as we'd no longer need the configuration setting that you are adding in this PR.
If there are some fields where the placeholders are still necessary, then we could look at ways to remove those placeholders or fix the color contrast (if possible). So, I'd rather not introduce this new omitSimpleFieldPlaceholders configuration, because we should discourage people from using placeholders in general.
|
Hi @FrancescoMolinaro, |
…concat/series (replace with labels)
|
Hi @tdonohue, many thanks for the feedback , I have aligned the PR with main and the changes that Andrea did for the date fields, I have also removed the property as you suggested, so that the fields won't have the placeholder at all. For field like concat or series I have replaced them with the label as it would be confusing to understand which field belong to which metadata. This should be now ready for a second review. |
tdonohue
left a comment
There was a problem hiding this comment.
👍 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).
|
Hi @FrancescoMolinaro, |
|
Hi @FrancescoMolinaro, |
|
Hi @FrancescoMolinaro, |
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!
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.