I noticed two patterns in my web app used in forms, and I can't remember how they got there.
One passes tokens around with <input ... type="hidden" />
, and other parts use <input ... hidden />
.
I looked at the MDN page for the attribute and the type=, and they seem exactly the same.
I went to this question, and it seemed to indicate that the hidden
attribute would hide the display, but not from other user-output methods (like screen readers). But it doesn't say anything about using type="hidden"
.
This question talks about display and the type="hidden"
, but doesn't mention other types of user-output methods.
How are these two handled differently by different output devices? How are they handled differently by forms? Are they treated differently by the DOM or DOM-stuff?
Is there some functional difference between these two? Is there some "best practices" difference? Some "expected way to do this" difference?