Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8305939

[Accessibility] [Win] Missing attribute for toggle state of CheckBox in CheckBoxTreeItem

XMLWordPrintable

    • source, behavioral
    • minimal
    • The change adds two enums only for accessibility purpose. There is no change in other functionality. This change is very specific to exposing accessibility information of a CheckBox of a CheckBoxTreeItem to accessibility client application.
    • Java API
    • JDK

      Summary

      Expose Accessibility information about CheckBox of a CheckBoxTreeItem to accessibility client application.

      Problem

      None of the accessibility client application can read the accessibility information of CheckBox of a CheckBoxTreeItem, 
because there is no supporting implementation present in JavaFX source.

      Solution

      Include the Toggle Control Pattern in Accessibility information of a CheckBoxTreeItem in addition to the patterns that are used for a TreeItem. Add a new AccessibleRole CHECK_BOX_TREE_ITEM and a new AccessibleAttribute TOGGLE_STATE. When an accessibility client application requests for toggle state of a CheckBoxTreeItem, fetch the TOGGLE_STATE attribute from CheckBox of CheckBxTreeItem.

      Specification

      javafx.scene.AccessibleRole: Add a new role : CHECK_BOX_TREE_ITEM

       /**
       * Check Box Tree Item role.
       * <p>
       * Attributes:
       * <ul>
       * <li> {@link AccessibleAttribute#TEXT} </li>
       * <li> {@link AccessibleAttribute#INDEX} </li>
       * <li> {@link AccessibleAttribute#SELECTED} </li>
       * <li> {@link AccessibleAttribute#EXPANDED} </li>
       * <li> {@link AccessibleAttribute#LEAF} </li>
       * <li> {@link AccessibleAttribute#DISCLOSURE_LEVEL} </li>
       * <li> {@link AccessibleAttribute#TREE_ITEM_COUNT} </li>
       * <li> {@link AccessibleAttribute#TREE_ITEM_AT_INDEX} </li>
       * <li> {@link AccessibleAttribute#TREE_ITEM_PARENT} </li>
       * <li> {@link AccessibleAttribute#TOGGLE_STATE} </li>
       * </ul>
       * Actions:
       * <ul>
       * <li> {@link AccessibleAction#EXPAND} </li>
       * <li> {@link AccessibleAction#COLLAPSE} </li>
       * <li> {@link AccessibleAction#REQUEST_FOCUS} </li>
       * </ul>
       *
       * @since 21
       */
      CHECK_BOX_TREE_ITEM,

      javafx.scene.AccessibleAttribute: Add a new AccessibleAttribute: TOGGLE_STATE

      /**
       * Returns {@link ToggleState toggle state} of CheckBox of CheckBoxTreeItem.
       * <ul>
       * <li>Used by: CheckBoxTreeItem</li>
       * <li>Needs notify: yes </li>
       * <li>Return Type: {@link ToggleState}
       *   <ul>
       *    <li>{@link ToggleState#UNCHECKED ToggleState.UNCHECKED}: control is not selected</li>
       *    <li>{@link ToggleState#CHECKED ToggleState.CHECKED}: control is selected</li>
       *    <li>{@link ToggleState#INDETERMINATE ToggleState.INDETERMINATE}:
       *                                     selection state of control cannot be determined</li>
       *   </ul>
       * </li>
       * <li>Parameters: </li>
       * </ul>
       *
       * @see ToggleState
       * @since 21
       */
      TOGGLE_STATE(ToggleState.class),

      Add a new enum to describe values for TOGGLE_STATE

      /**
       * This enum describes the values for {@link AccessibleAttribute#TOGGLE_STATE TOGGLE_STATE} attribute.
       *
       * @since 21
       */
      public enum ToggleState {
          /**
           * Indicates that the toggle control is not selected.
           */
          UNCHECKED,
      
          /**
           * Indicates that the toggle control is selected.
           */
          CHECKED,
      
          /**
           * Indicates that the toggle state of the control cannot be determined.
           */
          INDETERMINATE
      }

            arapte Ambarish Rapte
            webbuggrp Webbug Group
            Alexander Zuev, Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: