From ca013f42362798f9cc2b4cb78f4a28d78f59d53a Mon Sep 17 00:00:00 2001 From: Catalin Torge Date: Mon, 5 Aug 2024 19:03:09 +0100 Subject: [PATCH 1/2] fix(emoji-picker): add no result to aria region MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - adds no result message to aria live region BUG: Emoji - Search - No emoji found is not announced: SPARK-522103 Expected Result: No emoji found in the search results should be announced to the screen reader users, e.g. No Emoji Found Actual Result: When the user types in the search, the No emoji found displayed in the search results is not announced to the screen reader users. HTML: `
….
` Solution: Use aria-live to announce the information about No Emoji Found in the search result --- 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..0550a8b9 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 == null || this.state.searchResults.length === 0 + + const contents = emoji + ? emoji.name + : noSearchResults + ? I18n.search_no_results_2 + : '' return (
From 8c04a32e58c58a7aebca58a6b3d12f83f7bbdae0 Mon Sep 17 00:00:00 2001 From: Jan Podmajersky Date: Mon, 5 Aug 2024 20:06:11 +0200 Subject: [PATCH 2/2] v5.8.1 --- packages/emoji-mart/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/emoji-mart/package.json b/packages/emoji-mart/package.json index dfac9bdb..bc53e352 100644 --- a/packages/emoji-mart/package.json +++ b/packages/emoji-mart/package.json @@ -1,6 +1,6 @@ { "name": "@slidoapp/emoji-mart", - "version": "5.8.0", + "version": "5.8.1", "description": "Emoji picker for the web", "license": "MIT", "homepage": "https://missiveapp.com/open/emoji-mart",