From 9d2189a585f3366f564ff5051453d26a63ea1cb8 Mon Sep 17 00:00:00 2001 From: Catalin Date: Mon, 5 Aug 2024 13:27:38 +0100 Subject: [PATCH] fix(emoji-picker): add no result to aria region --- packages/emoji-mart/src/components/Picker/Picker.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/emoji-mart/src/components/Picker/Picker.tsx b/packages/emoji-mart/src/components/Picker/Picker.tsx index e747e1a0..49ab66ca 100644 --- a/packages/emoji-mart/src/components/Picker/Picker.tsx +++ b/packages/emoji-mart/src/components/Picker/Picker.tsx @@ -1069,7 +1069,14 @@ export default class Picker extends Component { renderLiveRegion() { const emoji = this.getEmojiByPos(this.state.pos) - const contents = emoji ? emoji.name : '' + const noSearchResults = + this.state.searchResults && !this.state.searchResults.length + + let contents = emoji + ? emoji.name + : noSearchResults + ? I18n.search_no_results_2 + : '' return (