Enum Class FocusOption.FocusVisible

java.lang.Object
java.lang.Enum<FocusOption.FocusVisible>
com.vaadin.flow.component.FocusOption.FocusVisible
All Implemented Interfaces:
FocusOption, Serializable, Comparable<FocusOption.FocusVisible>, Constable
Enclosing interface:
FocusOption

public static enum FocusOption.FocusVisible extends Enum<FocusOption.FocusVisible> implements FocusOption
Focus visibility option for focus operations.

Controls whether the browser should provide visible indication (focus ring) that an element is focused.

  • Enum Constant Details

    • DEFAULT

      public static final FocusOption.FocusVisible DEFAULT
      Browser decides based on accessibility heuristics (default behavior).

      When this option is used, the focusVisible property is not included in the options passed to the browser, allowing the browser to determine whether to show a focus ring based on how the focus was triggered (e.g., keyboard vs mouse).

    • VISIBLE

      public static final FocusOption.FocusVisible VISIBLE
      Force focus ring to be visible.

      Use this to ensure a visible focus indicator is shown, which can improve accessibility.

    • NOT_VISIBLE

      public static final FocusOption.FocusVisible NOT_VISIBLE
      Force focus ring to NOT be visible.

      Use this to prevent the focus ring from being shown. Use with caution as this may impact accessibility.

  • Method Details

    • values

      public static FocusOption.FocusVisible[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FocusOption.FocusVisible valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null