Releases: alphagov/accessible-autocomplete
v3.0.1
v3.0.0
Breaking changes
Verify your code does not rely on removed polyfills
Following on from our previous announcement, the accessible autocomplete code is no longer transpiled and polyfilled to support IE8-10.
However, because the polyfills create or extend global objects, you might have other code in your service unintentionally relying on the inclusion of these polyfills. You might need to introduce your own polyfills or rewrite your JavaScript to avoid using the polyfilled features.
This change was introduced in pull request #612: Update packages, configs + Node.js 20.
Check for minor visual changes in the rendering of the component
We've made some style adjustments to the stylesheet shipped with the component to make its colours, height, line-height and padding match those of the latest version of GOV.UK Frontend's <input>
.
If you're using this stylesheet:
- check if our style update affects the rendering of the component in your service, and adjust if necessary
- if you were adding to the default style's to match GOV.UK Frontend's input,
look for CSS declarations you may now be able to remove
This change was introduced in pull request #644: Align CSS styles with GOV.UK Frontend.
New features
Options to add classes to parts of the component
Use these new options to add your own classes to parts of the component:
inputClasses
for theinput
elementhintClasses
for the suggestion hint (input
element appearing when the text typed by the user matches the start of an option)menuClasses
for theul
element listing the options
You can also add custom classes to the ul
listing the options through the new menuAttributes
option, providing a className
or class
property.
This change was introduced in:
- pull request #602: Add
inputClasses
option. Thanks to @andreyyudin for contributing this change. - pull request #649: Update options for styling component inputs
- pull request #650: Update ways of configuring menu attributes
New class on the component's status
Use the new autocomplete__status
class in your CSS (or <CSS_NAMESPACE>__status
if you set the cssNamespace
option) to customise the styles of the component's status element (hidden element that makes announcements to assistive technologies).
This change was introduced in pull request #620: Add className attribute to status component. Thanks to @lennym for contributing this change.
Fixes
- Pull request #621: Handle query change when the text length does not change. Thanks to @archferns for contributing this change.
- Pull request #591: Add
menuAttributes
to fix Axe's 'aria-input-field-name' error. Thanks to @mchughbri for contributing this change. - Pull request #600: Fix null aria attributes. Thanks to @mark-roberts-ho for contributing this change.
- Pull request #606: Correct description of tStatusSelectedOption i18n option in README and tweak some wording for consistency with other parts of the README. Thanks to @ellamdav for contributing this change.
v2.0.4
v2.0.3
This release includes a fix to make it possible for the component to be used in a server side React environment.
Thanks @andymsuk for helping us with this release!
Changelog
Fixes
v2.0.2
This release includes fix for a bug that prevented users from clicking on options in certain circumstances.
Thanks @peterjaric and @edwardhorsford for their help with this release.
Changelog
Fixes
- Pull request #388: Set aria-selected as a string instead of a boolean to avoid being dropped.
- Pull request #400: Remove pointer events check.
- Pull request #406: Make hint padding match input padding.
- Pull request #407: Use a div element to wrap enhanced component.
- Pull request #410: Fix long clicks not selecting options.
v2.0.1
This release fixes a bug that may impact you if you're using the accessible autocomplete multiple times on one page.
We recommend you update to the latest release using npm:
npm install accessible-autocomplete@latest
Fixes
v2.0.0
We recommend you update to the latest release using npm:
npm install accessible-autocomplete@latest
Breaking changes
You must make the following change when you migrate to this release, or your service may break.
Migrate to the new accessible focus state
The focus state now meets the new WCAG 2.1 level AA requirements.
You do not need to do anything if you’re using Sass.
If you’ve previously copied CSS from our code into your project, you must copy all the CSS from our accessible-autocomplete.min.css
file into your CSS file.
If you’ve created custom CSS, you should check that your component meets WCAG 2.1 level AA requirements. You can read how we made the GOV.UK Design System focus states accessible.
Pull request #360: Update focus styles to meet WCAG 2.1 level AA non-text contrast requirements.
Fixes
Better compatibility with screen readers
The input field is now visible to all screen readers, because the input field now meets the Accessible Rich Internet Applications (ARIA) 1.0 standard instead of ARIA 1.1. ARIA 1.0 is better supported by the current versions of most screen readers.
Screen readers will now consistently tell users:
- when users have entered too few characters in the input field
- the correct number of search results, and what the results are
- which result users have highlighted
- how to use autocomplete in different screen readers - by reading hidden hint text
Screen readers will also now avoid telling users information they do not need to know after they highlight an option.
Thanks to Mark Hunter, Chris Moore and everyone at HMRC who worked on these improvements.
Pull request #355: Refinements to address accessibility issues