-
-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore the problematics HTML validation checks with hidden inputs #10020
Ignore the problematics HTML validation checks with hidden inputs #10020
Conversation
Rails adds `autocomplete="off"` automatically to hidden inputs which is not valid HTML. But we need to preserve this functionality for the time being because of a Firefox bug that is fixed using this workaround.
decidim-dev/lib/decidim/dev/test/w3c_rspec_validators_overrides.rb
Outdated
Show resolved
Hide resolved
Note: the aria-* attribute issue is caused by Foundation Abide and I'm fixing that for Foundation here: |
So the actual issue why this is working for me locally and why it is broken in the CI is that locally I'm using the online HTML validator and CI is using the docker packaged version. The online validator is not currently up-to-date with the docker packaged version. This is the assertion that is supposed to be failing: But it had a bug in it which was fixed today: So that last change is already published to the validator version we are using at CI. But the online validator is not yet updated which causes it to be still broken in the online version. Example HTML to test out this issue with the online validator: <!DOCTYPE html>
<html lang="">
<head>
<title>Test</title>
</head>
<body>
<form>
<input type="hidden" name="test" value="abc" aria-describedby="test-abide-error">
<span id="test-abide-error">Test</span>
</form>
</body>
</html> It will actually evaluate as valid due to the second change which is not yet published to the online validator (that I'm using locally). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a comment to be added and it'd be good for me. I've also changed the PR title to better reflect the latest changes, feel free to improve on it!
decidim-dev/lib/decidim/dev/test/w3c_rspec_validators_overrides.rb
Outdated
Show resolved
Hide resolved
Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
Done @andreslucena. |
decidim-dev/lib/decidim/dev/test/w3c_rspec_validators_overrides.rb
Outdated
Show resolved
Hide resolved
Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
Note: We only have to backport this to 0.27. Backporting to 0.26 is not necessary because:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏽
* develop: Ignore the problematics HTML validation checks with hidden inputs (#10020)
* develop: Ignore the problematics HTML validation checks with hidden inputs (#10020)
…cidim#10020) * Ignore the problematic HTML validation check with Rails Rails adds `autocomplete="off"` automatically to hidden inputs which is not valid HTML. But we need to preserve this functionality for the time being because of a Firefox bug that is fixed using this workaround. * Prevent aria-describedby attribute being added to hidden inputs * Revert "Prevent aria-describedby attribute being added to hidden inputs" This reverts commit 5a90162. * Ignore the aria-* attributes rule with hidden inputs * Add reference to the foundation issue Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com> * Remove unnecessary whitespace Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com> Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
🎩 What? Why?
Rails adds
autocomplete="off"
automatically to hidden inputs which is not valid HTML. This causes the following HTML validation issue after a recent update to the HTML validator:But we need to preserve this functionality for the time being because of a Firefox bug that is fixed using this workaround.
For the time being we will ignore this check until we will find a proper solution for this (see the related issue). The approach for ignoring the validation issue originates from #8597 (which we removed as unnecessary at #9878).
📌 Related Issues
autocomplete="off"
) rails/rails#46405Testing
See that CI is green or run these manually: