Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Certain attributes behave differently given the same value #628

Description

@bernardmcmanus

Environment:

Consider the following component:

const Input = () =>
  <input type="text" spellcheck="false" aria-invalid="false" />;

I would expect this to be rendered as:

<input type="text" spellcheck="false" aria-invalid="false" />

But the actual output is:

<input type="text" spellcheck="true" aria-invalid="false" />

I'm able get the desired spellcheck value by setting it to an empty string in the component, but aria-invalid behaves differently

const Input = () =>
  <input type="text" spellcheck="" aria-invalid="" />;

Now the rendered output is:

<input type="text" spellcheck="false" aria-invalid />

Ultimately, I have to pass different values to the spellcheck and aria-invalid attributes in the component to get the same values in the output:

const Input = () =>
  <input type="text" spellcheck="" aria-invalid="false" />;
<input type="text" spellcheck="false" aria-invalid="false" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions