Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTML5 boolean attributes to the list #30

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

cillianderoiste
Copy link
Contributor

@cillianderoiste cillianderoiste commented Jul 26, 2024

I noticed that when rendering a video element, tal:attributes="autoplay python:''" was rendering as autoplay='' which is treated as a positive value in the browser, enabling autoplay. By extending the list of boolean HTML attributes, the attribute is now dropped when empty.
I've included all the boolean attributes, and kept the old attributes, to maintain backwards compatibility.

Here's a list of all HTML5 boolean attributes, derived from https://html.spec.whatwg.org/multipage/indices.html#attributes-3
allowfullscreen
async
autofocus
autoplay
checked
controls
default
defer
disabled
formnovalidate
inert
ismap
itemscope
loop
multiple
muted
nomodule
novalidate
open
playsinline
readonly
required
reversed
selected
shadowrootclonable
shadowrootdelegatesfocus
shadowrootserializable

@icemac icemac enabled auto-merge (squash) August 6, 2024 06:44
@icemac
Copy link
Member

icemac commented Aug 6, 2024

Thank you for this PR. The broken tests seem to be unrelated to your changes, I will take care of them.

@icemac icemac self-assigned this Aug 6, 2024
@tseaver
Copy link
Member

tseaver commented Aug 6, 2024

The breakage induced in zope.proxy by the zope.interface v7.0 release should be fixed shortly.

@tseaver
Copy link
Member

tseaver commented Aug 6, 2024

I have restarted the failed jobs, which should be fixed by the release of zope.interface 7.0.1

@icemac icemac merged commit e04b9c7 into zopefoundation:master Aug 6, 2024
19 checks passed
@icemac
Copy link
Member

icemac commented Aug 7, 2024

@tseaver Thank you for fixing this so quickly.

@icemac
Copy link
Member

icemac commented Aug 7, 2024

@cillianderoiste cillianderoiste deleted the update-boolean-attrs branch August 7, 2024 08:57
@cillianderoiste
Copy link
Contributor Author

Fantastic, thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants