···3535 /// The input is labelled by a `<label>` element with a `for` attribute
3636 /// pointing to this input's id. This has the best accessibility support
3737 /// and should be [preferred when possible](https://www.w3.org/WAI/tutorials/forms/labels/).
3838- LabelledByLabelFor
3838+ LabelledByLabelElement
3939 /// The input should be labelled using the `formz.Config`'s `label` field.
4040- LabelledByFieldValue
4040+ LabelledByConfigValue
4141 /// The input is labelled by elements with the specified ids.
4242 LabelledByElementsWithIds(ids: List(String))
4343}
···6868 label: String,
6969) -> attribute.Attribute(msg) {
7070 case labelled_by {
7171- LabelledByLabelFor -> attribute.none()
7171+ LabelledByLabelElement -> attribute.none()
7272 LabelledByElementsWithIds(ids) ->
7373 attribute.attribute("aria-labelledby", string.join(ids, " "))
7474- LabelledByFieldValue ->
7474+ LabelledByConfigValue ->
7575 case label {
7676 "" -> attribute.none()
7777 _ -> attribute.attribute("aria-label", label)
···3434 /// The input is labelled by a `<label>` element with a `for` attribute
3535 /// pointing to this input's id. This has the best accessibility support
3636 /// and should be [preferred when possible](https://www.w3.org/WAI/tutorials/forms/labels/).
3737- LabelledByLabelFor
3737+ LabelledByLabelElement
3838 /// The input should be labelled using the `formz.Config`'s `label`.
3939- LabelledByFieldValue
3939+ LabelledByConfigValue
4040 /// The input is labelled by elements with the specified ids.
4141 LabelledByElementsWithIds(ids: List(String))
4242}
···64646565fn aria_label_attr(labelled_by: LabelledBy, label: String) -> List(attr.Attr) {
6666 case labelled_by {
6767- LabelledByLabelFor -> []
6767+ LabelledByLabelElement -> []
6868 LabelledByElementsWithIds(ids) -> [
6969 attr.aria_labelledby(string.join(ids, " ")),
7070 ]
7171- LabelledByFieldValue ->
7171+ LabelledByConfigValue ->
7272 case label {
7373 "" -> []
7474 _ -> [attr.aria_label(label)]
···3232 /// The input is labelled by a `<label>` element with a `for` attribute
3333 /// pointing to this input's id. This has the best accessibility support
3434 /// and should be [preferred when possible](https://www.w3.org/WAI/tutorials/forms/labels/).
3535- LabelledByLabelFor
3535+ LabelledByLabelElement
3636 /// The input should be labelled using the `formz.Config`'s `label`.
3737- LabelledByFieldValue
3737+ LabelledByConfigValue
3838 /// The input is labelled by elements with the specified ids.
3939 LabelledByElementsWithIds(ids: List(String))
4040}
···8282 // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby
8383 case labelled_by {
8484 // there should be a label with a for attribute pointing to this id
8585- LabelledByLabelFor -> ""
8585+ LabelledByLabelElement -> ""
86868787 // we have the id of the element that labels this input
8888 LabelledByElementsWithIds(ids) ->
···9191 })
92929393 // we'll use the label value as the aria-label
9494- LabelledByFieldValue -> {
9494+ LabelledByConfigValue -> {
9595 case label {
9696 "" -> ""
9797 _ -> " aria-label=\"" <> sanitize_attr(label) <> "\""