Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Following the compliance subtask list, I have begun applying
<label>
tags to form fields.Sometimes, this entailed adding id attributes to form fields.
I added i8n in a few files where translated documents already existed (e.g., foo.en.php, foo.es.php, and foo.fr.php).
If forms existed with multiple columns of form fields, I simplified them where possible such that form fields all fell within one column. This was done 1) to ease the burden on people using screen readers and 2) to ease the burden on people with dyslexia and/or ADHD.
I caught a few uses of
FILTER_SANITIZE_STRING
(which will be deprecated for PHP v.8.0+) and changed them tohtmlspecialchars(foo, HTML_SPECIAL_CHARS_FLAGS)
.In a few areas, if I happened to see a button or input element using an image, I added an
alt
attribute.In a few forms, for instance ones with ranges (x to y), I added explicit labels for the beginning and end ranges (or start and end dates). This was done 1) to ease the burden on people using screen readers and 2) to ease the burden on people with dyslexia and/or ADHD.
One file to pay particular attention to would be ../collections/harvestparams.php, as that form was changed quite a bit and reflects a lot of what I've read about best practice so far.
What is not in this PR
This PR is meant essentially to be a gut check that I'm on the correct track in terms of the changes that I'm implementing. It is nowhere close to inclusive of all of the changes to come (e.g., vocal form validation, form field highlighting, etc. etc.). Please refer to the compliance subtask list for the full list.
Pull Request Checklist:
Development
branch, NOTmaster
Development
andmaster
branches (at the same time).TODO
Development
branch, remember to use the squash & merge optionDevelopment
branch into the master branch, remember to use the merge optionDevelopment
branch to prevent accidental merges while QA takes placeThanks for contributing and keeping it clean!