inert
is not treated as a boolean attribute
#12727
Labels
- P2: nice to have
Not breaking anything but nice to have (priority)
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Same as 12023, but in this case it's the
inert
attribute. When resolving theinert
attribute Astro preserves the full attribute with its value: inert="true" or inert="false". This causes the relevant portion of the UI to become inert (can't interact with it via keyboard or mouse) in both true and false conditions.On v4.X, inert="true" was output when true, and nothing was when false.
inert
is not part of the list of boolean attributes at: https://github.com/withastro/astro/blob/astro%405.0.0-beta.1/packages/astro/src/runtime/server/render/util.ts#L9What's the expected result?
As per https://5-0-0-beta.docs.astro.build/en/guides/upgrade-to/v5/#changed-non-boolean-html-attribute-values, I expect the output of
inert={true}
should beinert
,inert={false}
should not output anything.See the specification for more details concerning this attribute.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-s2pipusj?file=src%2Fcomponents%2FWelcome.astro
Participation
The text was updated successfully, but these errors were encountered: