You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
autocomplete on input (the only element affected?) renders when false is passed, but no other attribute does this? #21344
<template>
Theese all render the attribute - any string value, or truthy value renders the attribute.
Here we defer to HTML for what behavior is. But strictly speaking of attribute rendering.
<divaria-hidden="{{true}}"></div>
<divaria-hidden={{true}}></div>
<divaria-hidden={{""}}></div>
<divaria-hidden></div>
<divaria-hidden=""></div>
<divaria-hidden="true"></div>
<divaria-hidden="false"></div>
These do not render the attribute
<divaria-hidden={{false}}></div>
<divaria-hidden={{null}}></div>
<divaria-hidden={{undefined}}></div>
autocomplete, specifically - behavior is different from above.
attribute is rendered.
I would consider this a bug.
<inputautocomplete={{false}}>
Attribute comes back, seems specific to autocomplete?
<inputhidden={{false}}>
</template>
The inverse — class, for, value, referrerpolicy, itemprop, itemtype diverts from that: The aria-hidden-style "omit on bare falsy" behavior is also a large group (~58 attrs: all HTML booleans, all ARIA, plus the six divertors above).
Activity
johanrd commentedon Apr 28, 2026
@NullVoxPopuli Tried now,
autocomplete={{false}}renderingautocomplete="false"seems to share shares behavior with at least ~28 others:Plain strings:
id,name,type,placeholder,alt,title,lang,role,target,rel,accept,dir,slot,method,enctype,action,src,href,download, Numerics on<input type="number">:min,max,step, Enumerateds:draggable,spellcheck,autocapitalize, Custom:part,popoverThe inverse —
class,for,value,referrerpolicy,itemprop,itemtypediverts from that: Thearia-hidden-style "omit on bare falsy" behavior is also a large group (~58 attrs: all HTML booleans, all ARIA, plus the six divertors above).Repro in limber here
Some noteworthy behavior divergencies:
1. "Plain string" attrs split: some omit, some render
"false"2. Numeric attrs split three ways
3. Enumerated attrs split three ways
4. Paired API attributes split
5.
contenteditable={{false}}≠contenteditable={{"false"}}6.
class={{false}}≠class="{{false}}"7.
checked="{{false}}"≠disabled="{{false}}"— but only in concat form8. Numeric-zero is falsy only for HTML boolean attrs
Treat bare {{false}} as a removal sentinel for HTML attributes (ember…