The documentation for Attributes.value says:
{-| Defines a default value which will be displayed in a `button`, `option`,
`input`, `li`, `meter`, `progress`, or `param`.
-}
value : String -> Attribute msg
value =
stringProperty "value"
It says "Defines a default value for input", but is incorrect.
The MDN page about the input tag does indeed say the following, but this is the value attribute, not the value property.
value: The initial value of the control
On the other hand, the Attributes.value implementation seems to set the value property. The MDN page about HTMLInputElement explains that the value property is about the "current value".
cf., https://github.com/elm/html/blob/master/properties-vs-attributes.md
The fundamental problem is that the meaning of "value" in each HTML element is inherently different, but they are all handled by one function at the same time. It is excessive commonization.
The documentation for
Attributes.valuesays:It says "Defines a default value for
input", but is incorrect.The MDN page about the input tag does indeed say the following, but this is the
valueattribute, not thevalueproperty.On the other hand, the
Attributes.valueimplementation seems to set thevalueproperty. The MDN page aboutHTMLInputElementexplains that thevalueproperty is about the "current value".cf., https://github.com/elm/html/blob/master/properties-vs-attributes.md
The fundamental problem is that the meaning of "value" in each HTML element is inherently different, but they are all handled by one function at the same time. It is excessive commonization.