From react docs
Note that all aria-* HTML attributes are fully supported in JSX. Whereas most DOM properties and attributes in React are camelCased, these attributes should be hyphen-cased (also known as kebab-case, lisp-case, etc) as they are in plain HTML:
AFAIK, every HTML attribute is renamed to camelCase in react.
Is there any reason to explain why aria-*
is kept their original name?
Bonus, is there anyone know, should it be <input autoFocus='autofocus'/>
or <input autofocus='autofocus'/>
. The former looks correct because my editor does not throw any warning. But is it inconsistent between the attribute name and its value?
Should it also be autocomplete
or autoComplete
, while there is no hyphen between auto
and complete
in the original attribute name?