Enum Class AriaLive

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

public enum AriaLive extends Enum<AriaLive>
ARIA live region politeness values.

The aria-live attribute indicates that an element will be updated, and describes the types of updates the user can expect from the live region. Screen readers use this to determine when and how to announce dynamic content changes.

  • OFF: Updates are not announced (default)
  • POLITE: Updates are announced when the user is idle
  • ASSERTIVE: Updates are announced immediately, interrupting the user

Usage:


 // Status messages that don't require immediate attention
 statusDiv.setAriaLive(AriaLive.POLITE);

 // Critical alerts that need immediate attention
 errorDiv.setAriaLive(AriaLive.ASSERTIVE);
 
Since:
2025
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Enum Constant Details

    • OFF

      public static final AriaLive OFF
      Updates are not announced.
    • POLITE

      public static final AriaLive POLITE
      Updates are announced when user is idle.
    • ASSERTIVE

      public static final AriaLive ASSERTIVE
      Updates are announced immediately, interrupting the user.
  • Method Details

    • values

      public static AriaLive[] 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 AriaLive 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-live attribute value.
      Returns:
      The live region politeness value.
    • toString

      public String toString()
      Returns the aria-live attribute value.
      Overrides:
      toString in class Enum<AriaLive>
      Returns:
      The live region politeness value.