Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown: Search won't put 'autocomplete=<something>' on <input /> #2734

Closed
AlvMF1 opened this issue Apr 24, 2018 · 3 comments
Closed

Dropdown: Search won't put 'autocomplete=<something>' on <input /> #2734

AlvMF1 opened this issue Apr 24, 2018 · 3 comments
Labels

Comments

@AlvMF1
Copy link

AlvMF1 commented Apr 24, 2018

Steps

const options = [
  { key: 1, text: 'United States', value: 'US' },
  { key: 2, text: 'Canada', value: 'CA' },
  { key: 3, text: 'Brazil', value: 'BR' },
]
<Dropdown
  search
  selection
  options={options}
  placeholder='Select Country'
  autoComplete='country' // HERE
/>

Expected Result

<div role="combobox" aria-expanded="false" class="ui search selection dropdown">
  <!-- autocomplete on input -->
  <input type="text" aria-autocomplete="list" autocomplete="country" class="search" tabindex="0" value="">
  ...
</div>

Actual Result

<!-- autocomplete on div? -->
<div autocomplete="country" role="combobox" aria-expanded="false" class="ui search selection dropdown">
  <input type="text" aria-autocomplete="list" autocomplete="off" class="search" tabindex="0" value="">
  ...
</div>

Version

0.79.1

@layershifter
Copy link
Member

Please use the shorthand for the search input.

https://react.semantic-ui.com/modules/dropdown#dropdown-example-search-input

@AlvMF1
Copy link
Author

AlvMF1 commented Apr 24, 2018

Didn't work for me...

const options = [
  { key: 1, text: 'United States', value: 'US' },
  { key: 2, text: 'Canada', value: 'CA' },
  { key: 3, text: 'Brazil', value: 'BR' },
]
<Dropdown
  search
  selection
  options={options}
  placeholder='Select Country'
  searchInput={{ autoComplete: 'country' }} // HERE
/>

Produces:

<div role="combobox" aria-expanded="false" class="ui search selection dropdown">
  <!-- autocomplete isn't on above div, but it's still "off" below -->
  <input type="text" autocomplete="off" aria-autocomplete="list" class="search" tabindex="0" value="">
  ...
</div>

@layershifter
Copy link
Member

See #2738.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants