Enum Class AriaCurrent

java.lang.Object
java.lang.Enum<AriaCurrent>
com.oorian.html.aria.AriaCurrent
All Implemented Interfaces:
Serializable, Comparable<AriaCurrent>, Constable

public enum AriaCurrent extends Enum<AriaCurrent>
ARIA current state values for indicating the current item in a set.

The aria-current attribute indicates the element that represents the current item within a container or set of related elements. It is commonly used for:

  • Current page in navigation
  • Current step in a multi-step process
  • Current date in a calendar
  • Current location in a breadcrumb

Usage:


 // Mark current page in navigation
 homeLink.setAriaCurrent(AriaCurrent.PAGE);

 // Mark current step in wizard
 step2.setAriaCurrent(AriaCurrent.STEP);

 // Mark today in calendar
 todayCell.setAriaCurrent(AriaCurrent.DATE);
 
Since:
2025
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • PAGE

      public static final AriaCurrent PAGE
      Represents the current page in a set of pages.
    • STEP

      public static final AriaCurrent STEP
      Represents the current step in a process.
    • LOCATION

      public static final AriaCurrent LOCATION
      Represents the current location in an environment or context.
    • DATE

      public static final AriaCurrent DATE
      Represents the current date in a collection of dates.
    • TIME

      public static final AriaCurrent TIME
      Represents the current time in a set of times.
    • TRUE

      public static final AriaCurrent TRUE
      Represents the current item (generic).
    • FALSE

      public static final AriaCurrent FALSE
      Does not represent the current item.
  • Method Details

    • values

      public static AriaCurrent[] 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 AriaCurrent 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
    • getValue

      public String getValue()
      Returns the aria-current attribute value.
      Returns:
      The current state value.
    • toString

      public String toString()
      Returns the aria-current attribute value.
      Overrides:
      toString in class Enum<AriaCurrent>
      Returns:
      The current state value.