diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/config/FormsFieldsConfig.java b/domino-ui/src/main/java/org/dominokit/domino/ui/config/FormsFieldsConfig.java index 2fd58e449..e1972bc1e 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/config/FormsFieldsConfig.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/config/FormsFieldsConfig.java @@ -109,6 +109,19 @@ default NumberParsers getNumberParsers() { return new NumberParsers() {}; } + /** + * Use this method to configure if pressing tab while select field is focused will move the focus + * to the select arrow addon or not. + * + *
Defaults to : false
+ *
+ * @return a boolean, true to enable focus on select arrow by pressing tab, false
+ * disable focus on select arrow when pressing tab.
+ */
+ default boolean isTabFocusSelectArrowEnabled() {
+ return false;
+ }
+
/**
* Use this method to define the default position of the field label, top or left
*
diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSelect.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSelect.java
index 42ca3c423..4af1abf1f 100644
--- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSelect.java
+++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/AbstractSelect.java
@@ -129,11 +129,21 @@ public AbstractSelect() {
Icons.chevron_down()
.addCss(dui_form_select_drop_arrow)
.clickable()
+ .setAttribute("tabindex", getConfig().isTabFocusSelectArrowEnabled() ? "0" : "-1")
+ .setAttribute(
+ "aria-expanded", getConfig().isTabFocusSelectArrowEnabled() ? "true" : "false")
.addClickListener(
evt -> {
evt.stopPropagation();
openOptionMenu();
- })));
+ })
+ .onKeyPress(
+ keyEvents ->
+ keyEvents.onEnter(
+ evt -> {
+ evt.stopPropagation();
+ openOptionMenu();
+ }))));
appendChild(
PrimaryAddOn.of(
diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/Select.java b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/Select.java
index 5ff5a3137..3c8e2f0c2 100644
--- a/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/Select.java
+++ b/domino-ui/src/main/java/org/dominokit/domino/ui/forms/suggest/Select.java
@@ -15,6 +15,7 @@
*/
package org.dominokit.domino.ui.forms.suggest;
+import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;
import java.util.Objects;
@@ -105,7 +106,7 @@ protected void onOptionSelected(SelectOption