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

Non-editable JTextArea provides no visual indication of keyboard focus

    Details

      Description

      Non-editable JTextAreas do not have any visual indication of keyboard focus. This makes it impossible for users to know where the focus has gone. This is particular problematic for keyboard-only users, because the JTextArea swallows Tab and Return. The user must know the focus is on this component in order to figure out they Control-Tab is needed to move out of the component.

      This problem violoates the section 508 accessibility guideslines (the first half of the quote below):

      "A well-defined on-screen indication of the
        current focus shall be provided that moves
        among interactive interface elements as the
        input focus changes. The focus shall be
        programmatically exposed so that assistive
        technology can track focus and focus
        changes."

      Non-editable JTextAreas are often used for instruction text at the top of a dialog box or wizard page. A non-focusable JTextArea could be used instead, but this makes the instruction text unfocusable for screen readers as well. This setup would violate the second part of the 508 rule as quoted above.


      ###@###.### 2001-10-12
      Note that this affects uneditable JTextFields as well, and possibly other components.
      Comments copied from http://bugs.openjdk.java.net/show_bug.cgi?id=100229

      Description From Dietmar Hechensteiner 2012-02-21 05:49:23 PDT

      Created an attachment (id=257) [details]
      Patch against openjdk7/jdk

      http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4512626

      Summary:
      Non-editable text components do not have any visual indication of keyboard
      focus. This makes it impossible for users to know where the focus has gone. The
      user must know the focus is on this component in order to figure out they
      Control-Tab is needed to move out of the component.

      Description of the change:
      Instead of binding the caret visibility to "enabled && editable" only "enabled"
      was choosen, as it provides a visual indication of the focus.

      Comment #1 From Tim Bell 2012-07-11 15:40:00 PDT

      Closing. This is SUNBUG 4512626. The information here will be transferred to
      that report.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: