aria-autocomplete
Advanced tools
Changelog
[1.5.1] - 2023-12-23
setOption(option, value)
method to the API to fix issue that assigning values directly to the api.options
object has no effectChangelog
[1.5.0] - 2023-03-04
delete()
method to the API to remove the latest entry. In multiple mode, can specify a selected entry. E.g. api.delete()
to delete the last entry in the selected
array, or api.delete(api.selected[0])
to delete a specific entry, or api.delete('some-value')
to delete an entry with that specific value.deleteAll()
method to the API to delete all entries in multiple mode. If not in multiple mode, this will be the equivalent of calling delete()
without an argument.Changelog
[1.4.0] - 2021-03-27
confirmOnBlur
option that can return a string to compare against the search result labels.confirmOnBlur
string matching behaviour to use the "cleaned" version of the search term and option label when blurring off of the field without a currently focused menu option.create
option when used as a function not being called with the API as context.Changelog
[1.3.0] - 2021-03-07
srDelay
option to specify the delay before custom screen reader announcements are made. This now defaults to 1400 milliseconds, instead of 400 as before.srAssistiveTextAutoClear
option to allow the assistive text option to be removed when user input is detected, to decrease screen reader verbosity. The assistive text is re-associated with the generated input if its value is cleared.srAutoClear
value to 10000 milliseconds.Changelog
[1.2.3] - 2020-11-01
create
option not applying to starting values.create
option persistence now correctly only applies when the autocomplete is used to progressively enhance a <select>
or checkbox list.create
and onItemRender
options.Changelog
[1.2.0] - 2020-10-31
onChange
callback option that fires when the selected item(s) changes, and provides all selections in an array as an argument.onFocus
callback option that fires when the overall component gains focus, and receives the component wrapper as an argument.onBlur
callback option that fires when the overall component loses focus, and receives the component wrapper as an argument.id
option to set a specific ID on the generated inputsource
option can now take a Promise which resolves with the items to render, instead of having to use the provided second argument callbackonAsyncBeforeSend
callback option, to allow adjustments to the xhr object before it is sent (e.g. adding auth headers)onAsyncComplete
callback option, that fires after async call successfully completes and all items have renderedsrAutoClear
option that takes a boolean, or number, to allow a delay before automatically clearing the screen reader announcement element - defaults to 5 secondsdeleteAllControl
and deleteAllText
options to render a button enabling quick deletion of all selected items (when there are at least 2 selected items)create
option to allow adding a results entry for the current search text (if no exact results match is found)source
is a function, there is now an additional final param that indicates if it is the first/starting call.aria-describedby
set to link them to the control labelaria-describedby
attribute on the generated input, instead of removing it when the input has a valuearia-describedby
attribute on the list container to reference the control'sname
option now works correctly.selected
array was updated.minLength
was set to 0 on a multi-select autocomplete with starting values. This was due to the input's placeholder being removed, which erroneously triggers the input
event in IE11.confirmOnBlur
option not working correctly when a results option did not currently have focus.