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

[Accessibility, API] rename a11y methods

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u40
    • 8u40
    • javafx

      Background info:

      Currently there are 3 methods in Node for accessibility.

      public Object accGetAttribute(Attribute attribute, Object... parameters)
      public void accExecuteAction(Action action, Object... parameters)
      public final void accSendNotification(Attribute attributes)

      accGetAttribute() is called by the screenreader when it needs the value for an Attribute. For example, the value for TITLE or PARENT.
      accSendNotification() is called by the Node to notify the screenreader that the value for the given attribute has changed. Possibly the screenreader will call accGetAttribute() is immediately to query the new value, therefore this method should be called after the value is updated.
      accExecuteAction() is called by the screenreader to request the Node to perform an action. Like firing a button for example. This is typically initiate by a screenreader key binding (or possibly voice-command).


      accGetAttribute() is always overwritten to handle addition attributes required by an specific role. It should always call super and not handling the given attribute.
      For example, a Button only has to handle TITLE and ROLE, all other attributes (BOUNDS, PARENT, FOCUSED, SCENE, DISABLED, etc) are handled in the super (Control, Parent, Node).

      See also RT-37749, we are proposing events for accGetAttribute() and accExecuteAction().
      That allows attributes to be overwritten without subclassing (FXML friendly). Thus, in a sense, accGetAttribute() and accExecuteAction() can be seen as the default event handlers for the Node.

      accGetAttribute() and accExecuteAction() are also declared in SkinBase, so that Control can query attributes only available within the Skin. For example, this allows the ListView to return its vertical scrollbar and selected cell back to the screen reader.

            fheidric Felipe Heidrich (Inactive)
            fheidric Felipe Heidrich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: