fasthtml icon indicating copy to clipboard operation
fasthtml copied to clipboard

[DOCS] Boolean attributes are set to empty string

Open HoldenLucas opened this issue 7 months ago • 0 comments

Issue Type

  • [x] Existing documentation (e.g. typos, errors, outdated information)
  • [ ] Suggest new documentation that is currently missing

Current Behavior or Documentation Gaps https://fastht.ml/docs/explains/explaining_xt_components.html#attributes

The attribute docs say Option("one", value="1", selected=True) produces <option value="1" selected>one</option>, when it actually produces <option value="1" selected="">one</option> (note the value of selected)

Suggested Improvement or New Documentation Content

The behavior is functionally equivalent, so this is only technically incorrect. https://developer.mozilla.org/en-US/docs/Glossary/Boolean/HTML

Relevant Links
#537

Confirmation
Please confirm the following:

  • [x] I have checked the existing issues and pull requests to ensure this documentation issue hasn't been reported before.
  • [x] I have read the project's documentation and am confident this issue or suggestion is valid.

HoldenLucas avatar Apr 24 '25 20:04 HoldenLucas