bolt
bolt copied to clipboard
DS-661: Replace Preact with React
Jira
- https://pegadigitalit.atlassian.net/browse/DS-661
Summary
Replace Preact renderer with React so that Bolt can include React/JSX files in the build.
Details
- Remove Preact-related dependencies and babel/webpack configurations and replace with latest versions of React equivalent.
- Upgrade
react-autosuggest
(used by Typeahead) for compatibility with latest React. - Remove unused accessibility features (
a11yStatusResults
,a11ySelectedOption
, etc.). These features are not actuall in use. - Remove
TypeaheadStatus
component, which adds unnecessary accessibility customizations that I'm not sure even work as expected. Thereact-autosuggest
library we are using is already WAI-ARIA compliant, with support for ARIA attributes and keyboard interactions. - I tested this in real Drupal and it works as expected 🎉
How to test
- Test Typeahead demos and compare to current version.
- Use with VoiceOver (command + F5) and verify it announces the same/similar prompts as the demos on https://react-autosuggest.js.org/.
Release notes
- Preact dependency is replaced with React v18. Typeahead is now rendered with React.