Open tvararu opened 7 years ago
I have updated the title of this issue now that https://github.com/alphagov/accessible-autocomplete/pull/154 is merged. The more advanced features are still up for grabs (we may split this into multiple issues later).
It might be good to consider an API similar to the baymard picker that allows you to provide alternate spellings as part of the select using data attributes.
this is definitely something we are keen to have in DWP, we require a list of hospitals and their aliases both of which should return results. We may also require address to return results, will be happy to pick it up if we have time within our team 👍
I would propose given the complexity (and therefore how difficult we're finding to maintain this component) to intentionally keep this component very simple and have good guidance to integrate search engines.
This would include making the relationship between the country picker etc, so we'd have guidance and encourage people to build 'engines' that plug into a simpler component.
@nickcolley Making aliases at a very basic level seems to be possible with a few lines of code, I think it could be worth having an example function of how to use aliases to return results using something like data attributes and a basic sorting function. Maybe this could be part of the guidance? I'm happy to make a really simple version of an alias function to document on the component.
@alexnewmannn appreciate you offering to help but we don't have a lot of time to work on features for this component, so we're prioritising bugs: for example accessibility issues.
We'll let you know if that changes as we'd love to get your input then, thanks again.
The progressive enhancement approach already uses a very simple suggestion engine. It would be easier to use the autocomplete if it offered an API that was as simple as:
And as a later feature, supporting (at a basic level):
Some work on this can be based on the openregister-picker-engine.