fix: do not add aria-describedby to hidden inputs #12496
Merged
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
The abide component is currently potentially adding the
aria-describedby
attribute also on hidden inputs where it is not valid HTML.The intention of the HTML validator is not to allow this through this rule:
https://github.com/validator/validator/blob/b896708d94d12df67075c6cfd43afc0f8a140ef0/src/nu/validator/checker/schematronequiv/Assertions.java#L2042-L2045
However, currently it is buggy and the following HTML passes the HTML validator:
But this fix will fix it also in the future versions of the HTML validator when that bug is fixed.
Types of changes
Checklist
develop
ordevelop-v...
).