This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 31597 - cannot use keyboard to navigate thru source editor
Summary: cannot use keyboard to navigate thru source editor
Status: CLOSED INVALID
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: mslama
URL:
Keywords: A11Y
Depends on:
Blocks:
 
Reported: 2003-02-28 23:09 UTC by Jeri Lockhart
Modified: 2008-12-23 11:52 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
S1S branded welcome screen - place in modules/locale (82.89 KB, application/octet-stream)
2003-03-04 18:05 UTC, Jeri Lockhart
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeri Lockhart 2003-02-28 23:09:56 UTC
This is a regression that happened since NB 3.4.

JDK1.4.0_02, Windows XP

The user cannot navigate using the Ctrl-tab thru
certain parts of the source editor component.

This is the way it works in 3.4:
1.  Start with focus in the explorer, or outside
of the source editor.
2. Ctrl-3 to go to the edit pane.
3. Ctrl-tab to vertical scroll bar, if present.
4. Ctrl-tab to horizontal scroll bar, if present.
5. Ctrl-tab to tab. 
    If there is another editor tab, use the left
or right arrow to go to it.
6.  From tab, Ctrl-tab to first toolbar item.
    Ctrl-tab thru all toolbars items.
7.  Ctrl-tab to edit pane.

In Nevada and trunk:


This bug comprimises S1S A11Y for Source Editor
and Welcome Screen.

1.  Start with focus in the explorer, or outside
of the source editor.
2. Ctrl-3 to go to the edit pane.
3. Ctrl-tab to vertical scroll bar, if present.
4. Ctrl-tab to horizontal scroll bar, if present.
5. CANNOT Ctrl-tab TO TAB.
   Instead Ctrl-tab to first toolbar item.
6. Ctrl-tab thru all toolbars items.
7.   Ctrl-tab to edit pane.
Comment 1 Jeri Lockhart 2003-02-28 23:13:19 UTC
Another indication that something is wrong, is that when you click on
the source editor tabs, they don't change visually to show that
they've been selected.  In 3.4, when the tab is clicked or selected,
it gets a border around it.
Comment 2 ehucka 2003-03-03 09:19:09 UTC
1. This is not only in editor. The explorer has not focusable tabs to. 
I don't know if it is real bug. I change to core module.

2. There is a way how to switch the tabs - Alt+<Arrows>. It cannot be
P1 issue.

3. A11Y issues start their priority at P3.
Comment 3 Peter Zavadsky 2003-03-04 10:09:51 UTC
I guess this was intentional change, and think this is invalid, anyway
I don't remember it well, passing to UI.
Comment 4 jrojcek 2003-03-04 17:26:32 UTC
This is intended behavior. The tabs are not focus-able. The user is
able to switch between tabs by keyboard using Alt+arrows, so this is
not a11y problem.

Switching between tabs didn't work either as focus was forwarded to an
editor inside a tab each time the user switched to the next tab.
Comment 5 Jeri Lockhart 2003-03-04 17:53:22 UTC
I have to reopen this because the S1S Nevada welcome screen is not
accessible if this isn't fixed.

The S1S-Nevada-branded welcome screen uses the same framework as the
NB 3.4 welcome screen, except that the content panel is different. 
The NB 3.4 screen is rendered in HTML, but the S1S screen is non-HTML
and uses only Swing components.

When the S1S branded welcome screen is the only tab in the source
editor, there is no way to navigate to it using only the keyboard.  If
there are other tabs open in the source editor, using ALT-arrow will
focus on the welcome screen. 

The only way to draw focus to the S1S screen, if it is the sole tab,
is with the mouse.  There is no circumvention that I can find.  After
focus is on the screen there are several JButtons that can be
CTRL-Tab'd to.

I will attach welcome_f4j.jar so that you can test this.  It should go
into netbeans/modules/locale.  The o/s welcome.jar should be in
netbeans/modules.  The branded source is in the c/s nevada branch of
CVS, but has not yet been added to the nevada build. 
Comment 6 Jeri Lockhart 2003-03-04 18:05:02 UTC
Created attachment 9263 [details]
S1S branded welcome screen - place in modules/locale
Comment 7 jrojcek 2003-03-04 20:20:21 UTC
Okay, this is a different issue. Window system is not transferring the
focus to a top component (welcome screen) correctly.

For example if the user invokes Windows|Source Editor menu item and
the welcome screen is the only tab in the editor, first focusable
component inside the welcome screen should get a focus. But it
doesn't, focus is lost somewhere. This can be a bug in the welcome
screen, though.

Marek, could you check that, please?
Comment 8 _ ttran 2003-03-04 21:50:31 UTC
Jan Rojcek is right.  TopComponent by default is not focusable.  Its
subclass can change this behavior by calling
setRequestFocusEnabled(true) in its constructor.  If one needs to
support jdk 1.4 the the preferred method to call is setFocusable(true)
because setRequestFocusEnabled is deprecated in 1.4.

Having said that I doubt that this is necessary.  The welcome screen
TopComponent very probably has a child component which should be
focusable (at the very least you need to put everything inside a
scroll pane to guard against the case that the window is too small).

=> INVALID
Comment 9 Jeri Lockhart 2003-03-05 00:14:49 UTC
Setting focusable on the c/s JPanel in the WelcomeComponent did not
make the S1S Welcome Screen focusable.  I opened IZ 31670 to make
nb_all/ui/welcome WelcomeComponent focusable. (I tested this and it works)
Comment 10 Jeri Lockhart 2003-03-07 01:38:10 UTC
Trung,
setRequestFocusEnabled(true) does not make the TopComponent focusable
via the keyboard CTRL-3.  Only setFocusable(true) will fix it.  

Unfortunately setFocusable() is JDK1.4, and I need the fix to the
release35 branch (see IZ 31670) which is built with JDK 1.3.1.  

setFocusable() needs to be called in the release35 WelcomeComponent so
that the S1S Nevada welcome screen will be A11Y-compliant.

How should this be handled?
--Jeri
Comment 11 _ ttran 2003-03-07 12:23:24 UTC
> Unfortunately setFocusable() is JDK1.4, and I need the fix to the
> release35 branch (see IZ 31670) which is built with JDK 1.3.1.  

Use reflection, see the email I already sent to you for the code