SiSearchBarComponent accepts a prohibitedCharacters input. When the typed term contains any of those characters, the component silently swallows the input. searchChange is not emitted
the ControlValueAccessor onChange is not called, so a bound formControl/ngModel keeps the last valid value while the DOM input shows the offending text and no visual, textual, or assistive-technology feedback is given.
The user just sees a search that stopped working with no explanation.
The component already has the styling hook for this, but it is dead code: isInvalid is hardcoded to false (si-search-bar.component.ts:127) and bound to [class.is-invalid] in the template (si-search-bar.component.html:13). It is never set to true.
The search bar should behave like the other Element form inputs: mark the field invalid and render a translatable error message.
/cc: @panch1739 @spike-rabbit
SiSearchBarComponentaccepts aprohibitedCharactersinput. When the typed term contains any of those characters, the component silently swallows the input.searchChangeis not emittedthe
ControlValueAccessoronChangeis not called, so a boundformControl/ngModelkeeps the last valid value while the DOM input shows the offending text and no visual, textual, or assistive-technology feedback is given.The user just sees a search that stopped working with no explanation.
The component already has the styling hook for this, but it is dead code: isInvalid is hardcoded to false (si-search-bar.component.ts:127) and bound to
[class.is-invalid]in the template (si-search-bar.component.html:13). It is never set totrue.The search bar should behave like the other Element form inputs: mark the field invalid and render a translatable error message.
/cc: @panch1739 @spike-rabbit