We recommend to wrap the emoji picker in a dt-popover component.
It is important to know the sequence of tab and emoji tabset will not change. You should always provide a proper tabSetLabels array to match the order of the emoji tabset.
The 'Most recently used' tab will always be the first tab in the tabSetLabels array. It should be updated dynamically by the consumer by using the recentlyUsedEmojis prop.
The skin-tone prop provided to the component should listen to the skin-tone event emitted by the skin selector button to be updated instantly.
You must listen to the close event to close the emoji picker. This event is emitted by the keyboard navigation on ESC.
For the withPopover variant it is necessary to provide the initial-focus-element="#searchInput" prop to the dt-popover component. With this we accomplish the requirement to have the search input focused when the emoji picker is opened.
The emoji picker starts with the focus on the input search to give the user a quick way to search for an emoji.
When the user searches for an emoji, the first emoji in the list will be highlighted, this allow the user to press ENTER to select this emoji.
From the input search the user can navigate by pressing UP arrow to the tabset or DOWN arrow to the emoji list.
From the tabset it is possible to navigate through the tabs with LEFT and RIGHT arrows, it will jump again to the input search with DOWN arrow.
From the emoji list you can navigate through the first emoji of each emoji tabset with TAB. If you are on the last emoji tabset (flags), it will jump to the skin tone selector. You can navigate through individual emojis and tabsets with the arrow keys.
You can jump to the previous first emoji of the previous emoji tabset with SHIFT + TAB. If you are on the first emoji tabset, it will jump to the input search.
In the skin tone selector the user can press ENTER to open the skin tone selector and select the desired skin tone, you can navigate through with LEFT and RIGHT arrows and select with ENTER. This selection will close the skin tone selector and emit the skin-tone event with the selected skin tone.
From the skin tone selector the user can jump to the tabset selector with TAB button.
This is the following sequence of the keyboard navigation with TAB:
Input search -> First emoji of the first emoji tabset
First emoji tabset -> Next first emoji of the next emoji tabset
First emoji of the last emoji tabset -> Skin tone selector
Skin tone selector -> Tabset selector
Tabset selector -> Input search
On ESC the emoji picker will emit the close event to close the emoji picker.