Enum Class AriaRole

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

public enum AriaRole extends Enum<AriaRole>
ARIA role attribute values for semantic accessibility meaning.

ARIA roles define what an element is or does, providing semantic meaning to assistive technologies like screen readers. Roles are divided into several categories:

  • Landmark roles: Define regions of a page (banner, navigation, main)
  • Widget roles: Define interactive components (button, checkbox, dialog)
  • Document structure roles: Define document organization (article, list, table)
  • Live region roles: Define dynamic content areas (alert, log, status)

Usage:


 // Set a navigation landmark
 nav.setRole(AriaRole.NAVIGATION);

 // Create an alert dialog
 dialog.setRole(AriaRole.ALERTDIALOG);

 // Mark a status region
 statusDiv.setRole(AriaRole.STATUS);
 
Since:
2025
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Identifies an important message requiring user attention.
    Identifies an alert dialog requiring user response.
    Identifies an application region.
    Identifies an article.
    Identifies site-oriented content at the beginning of a page (header).
    Identifies a button element.
    Identifies a cell in a table.
    Identifies a checkbox input.
    Identifies a column header cell.
    Identifies supporting content related to the main content.
    Identifies common information at the bottom of a page (footer).
    Identifies a definition.
    Identifies a dialog or modal window.
    Identifies a directory (deprecated, use list).
    Identifies a document region.
    Identifies a feed of articles.
    Identifies a figure with caption.
    Identifies a region containing a form.
    Identifies a grid (interactive table).
    Identifies a cell in a grid.
    Identifies a group of related elements.
    Identifies a heading.
    Identifies an image.
    Identifies a hyperlink.
    Identifies a list widget.
    Identifies a listbox widget.
    Identifies an item in a list.
    Identifies a log of messages.
    Identifies the primary content of a document.
    Identifies a marquee (scrolling text).
    Identifies mathematical content.
    Identifies a menu widget.
    Identifies a menu bar.
    Identifies a menu item.
    Identifies a checkable menu item.
    Identifies a menu item in a radio group.
    Identifies a collection of navigational links.
    Removes semantic meaning (presentational).
    Identifies a note or annotation.
    Identifies an option in a listbox.
    Removes semantic meaning (alias for none).
    Identifies a progress indicator.
    Identifies a radio button.
    Identifies a group of radio buttons.
    Identifies a perceivable section containing content relevant to a specific purpose.
    Identifies a row in a table or grid.
    Identifies a group of rows.
    Identifies a row header cell.
    Identifies a scrollbar.
    Identifies a search functionality.
    Identifies a search input.
    Identifies a separator.
    Identifies a slider control.
    Identifies a spin button.
    Identifies a status message.
    Identifies a toggle switch.
    Identifies a tab in a tablist.
    Identifies a table.
    Identifies a list of tabs.
    Identifies a tab panel.
    Identifies a term being defined.
    Identifies a text input.
    Identifies a timer display.
    Identifies a toolbar.
    Identifies a tooltip.
    Identifies a tree widget.
    Identifies a tree grid (tree + table).
    Identifies an item in a tree.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the ARIA role string value.
    Returns the ARIA role string value.
    static AriaRole
    Returns the enum constant of this class with the specified name.
    static AriaRole[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • COMPLEMENTARY

      public static final AriaRole COMPLEMENTARY
      Identifies supporting content related to the main content.
    • CONTENTINFO

      public static final AriaRole CONTENTINFO
      Identifies common information at the bottom of a page (footer).
    • FORM

      public static final AriaRole FORM
      Identifies a region containing a form.
    • MAIN

      public static final AriaRole MAIN
      Identifies the primary content of a document.
    • REGION

      public static final AriaRole REGION
      Identifies a perceivable section containing content relevant to a specific purpose.
    • ALERT

      public static final AriaRole ALERT
      Identifies an important message requiring user attention.
    • ALERTDIALOG

      public static final AriaRole ALERTDIALOG
      Identifies an alert dialog requiring user response.
    • BUTTON

      public static final AriaRole BUTTON
      Identifies a button element.
    • CHECKBOX

      public static final AriaRole CHECKBOX
      Identifies a checkbox input.
    • DIALOG

      public static final AriaRole DIALOG
      Identifies a dialog or modal window.
    • GRIDCELL

      public static final AriaRole GRIDCELL
      Identifies a cell in a grid.
    • LOG

      public static final AriaRole LOG
      Identifies a log of messages.
    • MARQUEE

      public static final AriaRole MARQUEE
      Identifies a marquee (scrolling text).
    • OPTION

      public static final AriaRole OPTION
      Identifies an option in a listbox.
    • PROGRESSBAR

      public static final AriaRole PROGRESSBAR
      Identifies a progress indicator.
    • RADIO

      public static final AriaRole RADIO
      Identifies a radio button.
    • RADIOGROUP

      public static final AriaRole RADIOGROUP
      Identifies a group of radio buttons.
    • SCROLLBAR

      public static final AriaRole SCROLLBAR
      Identifies a scrollbar.
    • SLIDER

      public static final AriaRole SLIDER
      Identifies a slider control.
    • SPINBUTTON

      public static final AriaRole SPINBUTTON
      Identifies a spin button.
    • STATUS

      public static final AriaRole STATUS
      Identifies a status message.
    • SWITCH

      public static final AriaRole SWITCH
      Identifies a toggle switch.
    • TAB

      public static final AriaRole TAB
      Identifies a tab in a tablist.
    • TABLIST

      public static final AriaRole TABLIST
      Identifies a list of tabs.
    • TABPANEL

      public static final AriaRole TABPANEL
      Identifies a tab panel.
    • TEXTBOX

      public static final AriaRole TEXTBOX
      Identifies a text input.
    • TIMER

      public static final AriaRole TIMER
      Identifies a timer display.
    • TOOLTIP

      public static final AriaRole TOOLTIP
      Identifies a tooltip.
    • TREE

      public static final AriaRole TREE
      Identifies a tree widget.
    • TREEGRID

      public static final AriaRole TREEGRID
      Identifies a tree grid (tree + table).
    • TREEITEM

      public static final AriaRole TREEITEM
      Identifies an item in a tree.
    • ARTICLE

      public static final AriaRole ARTICLE
      Identifies an article.
    • CELL

      public static final AriaRole CELL
      Identifies a cell in a table.
    • COLUMNHEADER

      public static final AriaRole COLUMNHEADER
      Identifies a column header cell.
    • DEFINITION

      public static final AriaRole DEFINITION
      Identifies a definition.
    • DIRECTORY

      public static final AriaRole DIRECTORY
      Identifies a directory (deprecated, use list).
    • DOCUMENT

      public static final AriaRole DOCUMENT
      Identifies a document region.
    • FEED

      public static final AriaRole FEED
      Identifies a feed of articles.
    • FIGURE

      public static final AriaRole FIGURE
      Identifies a figure with caption.
    • GROUP

      public static final AriaRole GROUP
      Identifies a group of related elements.
    • HEADING

      public static final AriaRole HEADING
      Identifies a heading.
    • IMG

      public static final AriaRole IMG
      Identifies an image.
    • LIST

      public static final AriaRole LIST
      Identifies a list widget.
    • LISTBOX

      public static final AriaRole LISTBOX
      Identifies a listbox widget.
    • LISTITEM

      public static final AriaRole LISTITEM
      Identifies an item in a list.
    • MATH

      public static final AriaRole MATH
      Identifies mathematical content.
    • NONE

      public static final AriaRole NONE
      Removes semantic meaning (presentational).
    • NOTE

      public static final AriaRole NOTE
      Identifies a note or annotation.
    • PRESENTATION

      public static final AriaRole PRESENTATION
      Removes semantic meaning (alias for none).
    • ROW

      public static final AriaRole ROW
      Identifies a row in a table or grid.
    • ROWGROUP

      public static final AriaRole ROWGROUP
      Identifies a group of rows.
    • ROWHEADER

      public static final AriaRole ROWHEADER
      Identifies a row header cell.
    • SEPARATOR

      public static final AriaRole SEPARATOR
      Identifies a separator.
    • TABLE

      public static final AriaRole TABLE
      Identifies a table.
    • TERM

      public static final AriaRole TERM
      Identifies a term being defined.
    • TOOLBAR

      public static final AriaRole TOOLBAR
      Identifies a toolbar.
    • GRID

      public static final AriaRole GRID
      Identifies a grid (interactive table).
    • APPLICATION

      public static final AriaRole APPLICATION
      Identifies an application region.
  • Method Details

    • values

      public static AriaRole[] 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 AriaRole 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 role string value.
      Returns:
      The role value for use in the role attribute.
    • toString

      public String toString()
      Returns the ARIA role string value.
      Overrides:
      toString in class Enum<AriaRole>
      Returns:
      The role value.