# Changelog

## 5.5.1 (2026-10-12)

### Patch Changes

- Update HTTP client to axios 1.20 (form-data 4.0.6)

## 5.5.0 (2026-09-28)

### Minor Changes

- Bundle shared utilities and their types instead of requiring a separate utility package.

## 5.4.6 (2026-09-28)

### Patch Changes

- Internal dependency updates

## 5.4.5 (2026-09-22)

### Patch Changes

- Internal dependency updates

## 5.4.4 (2026-09-18)

### Patch Changes

- Fix TypeScript errors from `@ideal-postcodes/jsutil`'s type declarations (`has no exported member 'UsaAddress'`, `Property 'Address' does not exist`), and address types silently falling back to `any` when `skipLibCheck` is enabled
- `@ideal-postcodes/openapi` is now installed as a dependency, so the address types always resolve. Runtime behaviour is unchanged
- Internal dependency updates

## 5.4.3 (2026-09-17)

### Patch Changes

- Internal dependency updates

## 5.4.2 (2026-08-20)

### Patch Changes

- Screen reader announcements no longer risk being spoken twice: the live regions use `aria-live` alone rather than doubling it with `role="status"`, which some screen readers register as two live regions. The first results announcement now also identifies the active search country and how to change it, e.g. `"10 addresses available. Searching United Kingdom. Press Tab to change country"` (announced once per widget instance; omitted when the toolbar is hidden).
- The country toggle is now fully keyboard operable: reach it with Tab, activate it with Enter or Space, dismiss the widget with Escape. Moving focus to the toggle no longer closes the suggestion list, the toggle highlights on keyboard focus as it does on hover, and the suggestion list itself no longer occupies a tab stop. The previously ignored `msgCountryToggle` option now sets the toggle label, which defaults to `"Change Country"` (previously hardcoded as `"Select Country"`). The label's slide-out is wide enough to show it without clipping, and the external stylesheet (`css/address-finder.css`) carries the same keyboard-focus styling as the injected one.
- Fix invalid listbox semantics reported to screen readers while a notice such as `"No matches found"` is on display: the notice is presentational and the list only exposes a listbox role while it contains selectable options. All widget states now pass axe-core's WCAG 2.1/2.2 A and AA rulesets, which gate every release.
- Internal dependency updates

## 5.4.1 (2026-07-27)

### Patch Changes

- Bump `@ideal-postcodes/core-axios` to `~4.1.9` (axios `~1.18.1`)

## 5.4.0 (2026-07-21)

### Minor Changes

- Offer users an out when a search returns no matches. Set `msgNoMatchAction` (e.g. `"Enter address manually"`) to render an actionable item beneath the no-match message and define what happens on selection with the `onNoMatchAction` callback - for instance, revealing a manual address entry form. The item is keyboard accessible and can be styled via `noMatchActionClass`.

## 5.3.0 (2026-07-13)

### Minor Changes

- - Add a `shouldAddressPopulate` hook, run after an address is retrieved and before it is written to the form, so you can gate population (for example, delivery-area checks or custom confirmation flows). Return `false` to cancel, `true` to proceed.
  - Promote the active country to the top of the country selector.
  - Honour `restrictCountries` over IP geo-detection.
  - Resolve Jersey, Guernsey and Isle of Man addresses to the UK format.

## 5.2.16 (2026-07-03)

### Patch Changes

- Fixed static stylesheet (`css/address-finder.css`) to match the injected styles. The external CSS file was using outdated selectors that didn't target the current DOM structure, causing broken styling when using `injectStyle: false` with a `<link>` tag.

## 5.2.15

### Patch Changes

- Update `@ideal-postcodes/core-axios` to 4.1.8, which upgrades axios to 1.16.1. This resolves all published axios security advisories, including a regular expression denial of service via cookie names (GHSA-hfxv-24rg-xrqf) and a family of prototype pollution gadget issues fixed in axios 1.15.1–1.16.0.

## 5.2.14

### Patch Changes

- Update npm package metadata so `repository`, `bugs`, and `homepage` links on the npm page point to active resources: the issue tracker at `ideal-postcodes/feedback` and the docs at `docs.ideal-postcodes.co.uk`.

## 5.2.13 (2026-04-29)

### Bug Fixes

- **Changelog:** Include changelog md in release

## 5.2.12 (2026-04-23)

### Bug Fixes

- **controller:** Replace RegExp with startsWith in filteredContexts to handle metacharacters

## 5.2.11 (2026-04-13)

### Bug Fixes

- **controller:** Throw Error instance instead of string in address resolution

## 5.2.10 (2026-03-20)

### Bug Fixes

- **hide:** Dynamic html element addon to config with additional styling

## 5.2.9 (2026-03-12)

### Bug Fixes

- **Release:** Disable provenance

## 5.2.8 (2026-03-12)

### Bug Fixes

- **Release:** Disable provenance

## 5.2.7 (2026-03-11)

### Bug Fixes

- **axios:** bump @ideal-postcodes/core-axios from 4.1.6 to 4.1.7
- **Release:** Fix release process

## 5.2.6 (2025-09-15)

### Bug Fixes

- **axios:** bump @ideal-postcodes/core-axios from 4.1.5 to 4.1.6

## 5.2.5 (2025-06-10)

### Bug Fixes

- **Events:** Remove duplicate listener

## 5.2.4 (2025-03-24)

### Bug Fixes

- **core-axios:** Fix security issue with axios <1.8.3

## 5.2.3 (2025-03-14)

### Bug Fixes

- **jsutil:** Update to v 7.4.3

## 5.2.2 (2025-03-04)

### Bug Fixes

- **jsutil:** Update jsutil to 7.4.2

## 5.2.1 (2025-03-04)

### Bug Fixes

- **jsutil:** Update to version 7.4.1
- **Release:** Fix automated release pipeline

## 5.2.0 (2025-02-25)

### Features

- **International Addresses:** Allow population of native address

## 5.1.3 (2024-11-04)

### Bug Fixes

- **Docs:** Simplify readme instructions

## 5.1.2 (2024-11-04)

### Bug Fixes

- **Readme:** Update docs

## 5.1.1 (2024-11-04)

### Bug Fixes

- **events:** Fix closing list after scrollbar click

## 5.1.0 (2024-10-07)

### Features

- **jsutil:** Bump jsutil to version 7.3.0

## 5.0.2 (2024-10-02)

### Bug Fixes

- **jsutil:** Version fix

## 5.0.1 (2024-09-24)

### Bug Fixes

- **styles:** Fix inline styles adding to avoid css csp errors

## 5.0.0 (2024-08-19)

### Features

- **Dependencies:** Update Axios to 1.7.4

### BREAKING CHANGES

- **Dependencies:** Drop support for IE11. Removed polyfills that enable IE11 support for smaller bundle sizes

## 4.6.2 (2024-08-13)

### Bug Fixes

- **Watch:** Inject defaults to watch

## 4.6.1 (2024-08-13)

### Bug Fixes

- **Watch:** Pass Controller config to watch

## 4.6.0 (2024-07-08)

### Features

- **Resolve:** Add ability to customer resolve query

## 4.5.3 (2024-04-05)

### Bug Fixes

- **jsutil:** Update to version 7.1.0

## 4.5.2 (2024-03-28)

### Bug Fixes

- **jsutil:** Fix line concatenation

## 4.5.1 (2024-03-27)

### Bug Fixes

- **JSUtil:** Update to 7.0.2

## 4.5.0 (2024-02-22)

### Features

- **country:** Sync country context change with user form select or input

## 4.4.1 (2023-11-27)

### Bug Fixes

- **core-axios:** Bump version to 4.1.2

## 4.4.0 (2023-11-21)

### Features

- **Countries:** Filter countries using typed input
- **Countries:** Narrow countries with input

## 4.3.0 (2023-09-07)

### Features

- **contexts:** Add callback triggered on context change

## 4.2.0 (2023-08-31)

### Features

- **list:** Add fixed position to list positioning

## 4.1.0 (2023-07-21)

### Features

- **tests:** Migrate unit test to cypress
- **watch:** Set keys contexts

## 4.0.0 (2022-08-09)

### Features

- **Countries:** Detect countries on Startup

### BREAKING CHANGES

- **Countries:** Local country will be detected by IP address

## 3.1.0 (2022-04-14)

### Bug Fixes

- **Cache:** Clear cache when context is changed

### Features

- **USA:** Resolve US style addresses
- **USA Format:** Add US address resolution format

## 3.1.0-beta.1 (2022-04-04)

### Features

- **USA:** Resolve US style addresses
- **USA Format:** Add US address resolution format

## 3.0.1 (2022-03-21)

### Bug Fixes

- **Context:** Allow initial context to be changed

## 3.0.0 (2022-02-28)

### Bug Fixes

- **Exports:** Namespace all exports to AddressFinder

### Features

- **Countries:** Allow user to restrict to specific countries
- **Hints:** Add hints in placeholder
- **Resolver:** Use new resolve API
- **Styling:** Automatically offset AF if input has bottom margin
- **Toolbar:** Option to hide toolbar
- **Typings:** Drop api-typings for OpenApi typings
- **USA:** Add support for US Address Search
- **View:** View brought into main scope

### BREAKING CHANGES

- **Global:** Enables Address Validation for USA alongside GBR
- **AddressFinder:** - A parent element which wraps both the address finder suggestion list
  and toolbar
- Controller no longer provides `view` attribute. References to DOM
  Elements are stored directly on the instance
- `next()` and `previous()` only update internal state but do not
  advance the state machine
- **Exports:** All exports have been namespaced to AddressFinder
- **View:** Removed controller.view. View components are incorporated into main
  Address Finder instance. e.g. `controller.view.input` becomes
  `controller.input`
- **Resolver:** Address Finder now completes addresses using the
  /autocomplete/addresses/:id API
- **USA:** Adds USA support. Underlying API Client upgraded to
  3.0.0
- **AddressFinder:** - A parent element which wraps both the address finder suggestion list
  and toolbar
- Controller no longer provides `view` attribute. References to DOM
  Elements are stored directly on the instance
- `next()` and `previous()` only update internal state but do not
  advance the state machine
- **Typings:** Address Finder now uses the typings found at
  @ideal-postcodes/openapi

## 3.0.0-beta.2 (2022-02-28)

### Features

- **Toolbar:** Option to hide toolbar

## 3.0.0-beta.1 (2022-02-21)

### Bug Fixes

- **Exports:** Namespace all exports to AddressFinder

### Features

- **AddressFinder:** 3.0.0
- **Countries:** Allow user to restrict to specific countries
- **Hints:** Add hints in placeholder
- **Resolver:** Use new resolve API
- **Styling:** Automatically offset AF if input has bottom margin
- **Typings:** Drop api-typings for OpenApi typings
- **USA:** Add support for US Address Search
- **USA:** Add USA support
- **View:** View brought into main scope

### BREAKING CHANGES

- **AddressFinder:** - A parent element which wraps both the address finder suggestion list
  and toolbar
- Controller no longer provides `view` attribute. References to DOM
  Elements are stored directly on the instance
- `next()` and `previous()` only update internal state but do not
  advance the state machine
- **Exports:** All exports have been namespaced to AddressFinder
- **View:** Removed controller.view. View components are incorporated into main
  Address Finder instance. e.g. `controller.view.input` becomes
  `controller.input`
- **Resolver:** Address Finder now completes addresses using the
  /autocomplete/addresses/:id API
- **Typings:** Address Finder now uses the typings found at
  @ideal-postcodes/api-typings
- **USA:** Adds USA support. Underlying API Client upgraded to
  3.0.0

## 2.5.1 (2022-01-06)

### Bug Fixes

- **Core-Axios:** Update client

## 2.5.0 (2021-10-15)

### Features

- **Watch:** Allow custom load identifiers

## 2.4.2 (2021-10-06)

### Bug Fixes

- **deps:** bump @ideal-postcodes/core-axios from 3.0.3 to 3.0.5

## 2.4.1 (2021-09-28)

### Bug Fixes

- **KeyPress:** preventDefault on enter keydown

## 2.4.0 (2021-08-30)

### Features

- **Search Config:** Apply custom search config

## 2.3.4 (2021-07-28)

### Bug Fixes

- **deps:** bump @ideal-postcodes/jsutil from 4.4.2 to 4.5.0

## 2.3.3 (2021-07-23)

### Bug Fixes

- **Core Axios:** Bump to 3.0.3

## 2.3.2 (2021-07-23)

### Bug Fixes

- **TSConfig:** Fix ES2020 as target

## 2.3.1 (2021-07-20)

### Bug Fixes

- **Go:** Export `go` from AddressFinder

## 2.3.0 (2021-07-13)

### Bug Fixes

- **Config Clash:** Fixes autocomplete w/ idpcConfig

### Features

- **Callbacks:** Add Watch callbacks

## 2.2.2 (2021-07-05)

### Bug Fixes

- **deps:** bump jsutil from 4.2.1 to 4.2.2

## 2.2.1 (2021-07-01)

### Bug Fixes

- **deps:** bump @ideal-postcodes/jsutil from 4.4.0 to 4.4.1

## 2.2.0 (2021-06-29)

### Features

- **OutputFields:** Target fields using names and labels

## 2.1.0 (2021-06-23)

### Features

- **Styling:** Expose config for styling of suggestions

## 2.0.0 (2021-06-10)

### Bug Fixes

- **Suppress:** Add flags to suppress county and org name

### Features

- **Go:** Wraps setup in DOMContentLoaded callback
- **Input Field:** Default inputField to outputFields.line_1 if not
- **Styles:** Inject CSS by default
- **Watch:** Dynamically watch pages for AF attachment

### Performance Improvements

- **Core-Axios:** Upgrade to v3

### BREAKING CHANGES

- **Styles:** Stylsheet will be injected to the page by default. To
  disable set `injectStyle: false`

## 1.8.4 (2021-05-09)

### Bug Fixes

- **JsUtil:** Upgrade utils
- **SSR:** Better support for SSR

## 1.8.3 (2021-04-23)

### Bug Fixes

- **deps:** bump @ideal-postcodes/jsutil from 4.3.7 to 4.3.8

## 1.8.2 (2021-03-15)

### Bug Fixes

- **JSUtil:** Bump to latest

## 1.8.1 (2021-03-11)

### Bug Fixes

- **License:** Update

## 1.8.0 (2021-03-11)

### Bug Fixes

- **CSS:** Raise z-index of list and selected

### Features

- **Autofill Prevention:** Custom autocomplete

## 1.7.0 (2021-03-01)

### Features

- **Hide:** Add ability to hide/unhide fields

## 1.6.0 (2021-03-01)

### Features

- **Callbacks:** Add more callbacks

## 1.5.4 (2021-02-11)

### Bug Fixes

- **Chrome Autofill:** Bypass chrome autofill with none

## 1.5.3 (2021-02-09)

### Bug Fixes

- **Deps:** Use cjs lodash

## 1.5.2 (2021-02-09)

### Bug Fixes

- **Deps:** Upgrade jsutil

## 1.5.1 (2021-02-05)

### Bug Fixes

- **CSS:** Restore .hidden

## 1.5.0 (2021-02-05)

### Features

- **Styles:** Allow style modification

## 1.4.0 (2021-02-05)

### Bug Fixes

- **CSS:** Hide list with style attribute
- **Wrapper:** Reset CSS on wrapper

### Features

- **Defaults:** Export AF defaults
- **WAI-ARIA:** Add aria set attributes
- **WAI-ARIA:** Add screen reader announcements
- **WAI-ARIA:** Add WAI-ARIA 1.1 compliance
- **WAI-ARIA:** Enable WAI-ARIA 1.0 support

## 1.3.1 (2021-01-20)

### Bug Fixes

- **Rollup:** Update + Export rollup config

## 1.3.0 (2021-01-20)

### Features

- **CSS:** Make CSS overrideable
- **Messages:** Allow default messages to be overridden
- **onSuggestError:** Callback if suggsetion error

## 1.2.1 (2021-01-18)

### Bug Fixes

- **Deps:** Bump jsutil

## 1.2.0 (2021-01-15)

### Bug Fixes

- **JSUtil:** Update to 4.0
- **Scoping:** Narrow address population scope to outputScope

### Features

- **CSS:** Add option to inject CSS

## 1.1.1 (2021-01-05)

### Bug Fixes

- **CSS:** Add back address-finder.css

## 1.1.0 (2021-01-05)

### Features

- **CSS:** Ship CSS files with npm module

## 1.0.1 (2021-01-05)

### Bug Fixes

- **deps:** [security] bump axios from 0.21.0 to 0.21.1

## 1.0.0 (2021-01-04)

### Features

- **Release:** Initial Release
