Interpolating boolean attributes in HEEx

It is OK to assign to multiple dynamic attributes at once, using the syntax of your last example.

However, the result is expected to be a keyword-list or a map. Currently you are returning a single string.

Instead, you can do, for instance:

<input type="checkbox" name="web_pages[]" value={w.id} {if w.id in @selected, do: %{checked: true}} />

However, in neither case will the result be a valueless attribute.
I don’t think this is a bad thing. Instead, not supporting this special case makes it easier for the HEEx parser to always generate correct HTML.