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
Would it be possible to make the empty string an alias for "true" (for relevant attributes) for HTML5 shorthand compatibility?
According to this React comment, every boolean attribute defaults to "false" if not present. However, from a quick search of the spec, some roles (e.g. role="alert") change the default to true (in that case, aria-checked), so I can see the value of a separate true/false that's more than just presence/non-presence. However, HTML5 idiomatically prefers the empty string for things that are conceptually true, and has a special syntax for that to encourage such definitions and usage. So would it be possible to accomodate that by making "" an alias for "true" for attributes that accept an attribute named "true" (provided it doesn't conflict with other possible values)?
The text was updated successfully, but these errors were encountered:
Would it be possible to make the empty string an alias for
"true"
(for relevant attributes) for HTML5 shorthand compatibility?According to this React comment, every boolean attribute defaults to
"false"
if not present. However, from a quick search of the spec, some roles (e.g.role="alert"
) change the default to true (in that case,aria-checked
), so I can see the value of a separatetrue
/false
that's more than just presence/non-presence. However, HTML5 idiomatically prefers the empty string for things that are conceptually true, and has a special syntax for that to encourage such definitions and usage. So would it be possible to accomodate that by making""
an alias for"true"
for attributes that accept an attribute named"true"
(provided it doesn't conflict with other possible values)?The text was updated successfully, but these errors were encountered: