question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The `id` prop will be required in future versions to make the component accessible for users of assistive technologies such as screen readers.

See original GitHub issue

Version

"react-bootstrap-typeahead": "^3.4.5"

Steps to reproduce

users = [
{ 
"id": "5d08f94da9d6d25011d55e87",
"name": "Leo"
},
...
]

                  <Typeahead
                    labelKey="name"
                    options={users}
                    placeholder="Search user..."
                    onChange={this.handleChangeTy('userSelect')}
                  />

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
ericgiocommented, Jun 18, 2019

Hi @Angelk90, sure:

<Typeahead
  id="my-typeahead-id"
  labelKey="name"
  options={users}
  placeholder="Search user..."
  onChange={this.handleChangeTy('userSelect')}
/>

It works like the id on any normal element.

1reaction
cameron-martincommented, Dec 12, 2019

Ah makes sense. There seems to be some interest in introducing a method for unique ID generation into React, particularly because the current methods do not work with both SSR & suspense. This would likely change the common practice to being generating these IDs internally. See the open RFC and PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed propType: The prop `id` is required to make `Dropdown ...
Failed propType: The prop `id` is required to make `Dropdown` accessible for users of assistive technologies such as screen readers. Check the ...
Read more >
Accessibility - React
Accessibility support is necessary to allow assistive technology to interpret web pages. React fully supports building accessible websites, often by using ...
Read more >
React Bootstrap Typeahead Example
Basic Example. The typeahead allows single-selection by default. Setting the multiple prop turns the component into a tokenizer, allowing multiple selections.
Read more >
Use Salesforce Classic with Assistive Technologies
Learn about accessibility features designed for users working with assistive devices, such as speech recognition software and screen readers.
Read more >
ARIA - Accessibility - MDN Web Docs - Mozilla
Accessible Rich Internet Applications (ARIA) is a set of roles and attributes that define ways to make web content and web applications ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found