Do you want to request a feature or report a bug?
Report a bug
What is the current behaviour?
As per React Issue #10987, setting a tabIndex on
If the current behaviour is a bug, please provide the steps to reproduce.
<svg tabIndex={0}> renders incorrectly to <svg tabIndex="0">
What is the expected behaviour?
The tabIndex attribute should render as tabindex="0"
Because of size constraints, preact doesn't maintain a list of property mappings.
Maybe this could be handled within preact-compat for compatibility reasons.
But imho a developer should just use tabindex if that 's the attribute he wants to set/change.
I'm in agreement with @Kanaye here - the correct name is already defined in the SVG spec, we don't need libraries like React or Preact to take liberties renaming things.
Side note: I also think this goes beyond filesize constraints to a more fundamental issue: changing behavior to deviate from an existing specification causes confusion and adds dangerous platform lock-in.
To see how that plays out, look at developer knowledge of onchange vs oninput over the past 5 years - these standardized events with well-defined behaviors are now misunderstood because React decided to create an entirely new semantic for onchange :(
This has been documented in https://github.com/preactjs/preact-www/issues/615
Most helpful comment
I'm in agreement with @Kanaye here - the correct name is already defined in the SVG spec, we don't need libraries like React or Preact to take liberties renaming things.
Side note: I also think this goes beyond filesize constraints to a more fundamental issue: changing behavior to deviate from an existing specification causes confusion and adds dangerous platform lock-in.
To see how that plays out, look at developer knowledge of
onchangevsoninputover the past 5 years - these standardized events with well-defined behaviors are now misunderstood because React decided to create an entirely new semantic foronchange:(