After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 70372 - Keynav and insensitive menu items
Keynav and insensitive menu items
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
1.3.x
Other Linux
: Normal major
: Medium feature
Assigned To: gtk-bugs
gtk-bugs
AP3
Depends on:
Blocks:
 
 
Reported: 2002-02-02 17:32 UTC by Owen Taylor
Modified: 2015-12-22 00:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Owen Taylor 2002-02-02 17:32:51 UTC
When there are insensitive items in a menu:

 a) should they be selectable from the keyboard (and in fact,
    show mouseover?) [ they aren't currently, and we may
    not be able to change this in the 2.0.0 timeframe. ]

 b) If they shouldn't be (or anywyas as currently, aren't)
    then what should happen in "select first item in the
    menu item contexts" such as popping up a context menu
    with Shift-F10:

     i.) Nothing is selected. Hitting <down> selects
         the first sensitive item.
  
     ii.) the first selectable item is selected

   i.) has the advantage that if the user hits return immediately,
   nothing will happen, but the disadvantage that in the 
   popup menu case, _nothing_ is selected/focused, which
   is visually confusing. (It's not so bad when, say,
   activating a menu with a mnemonic, since then the focus
   stays on the menubar.)
Comment 1 Calum Benson 2002-02-04 13:20:04 UTC
Allowing insensitive menu items to be highlighted/navigated is
probably the best solution for the user, since:

- keynav behaviour remains predictable under all circumstances, 
- there's no risk of activating the wrong menu item by mistake by not
paying attention,
- it allows online help/status bar help/tooltips etc. to be accessed
for menu items even if they are unavailable-- particularly useful if
the help explains how to make the item available again.

(Brief aside on popup menus: in a well-designed UI the first item on a
popup menu should never really be unavailable anyway-- you could even
argue that no items on a popup menu should ever be unavailable, since
it's only supposed to show items applicable to the current selection,
but in practice it doesn't quite work like that...)
Comment 2 Owen Taylor 2002-02-04 17:42:56 UTC
The problem with this is that currently selected and
insensitive are exclusive states in GTK+. May be
possible to fix this with some hacks (draw the menu
item as not insensitive even when it is, and draw
the children insensitive.) Not trivial though.

(Is a redesigin of the entry popup needed? Cut, the first
item, will be insensitive any time no text is selected.)
Comment 3 Calum Benson 2002-02-12 18:20:17 UTC
This could be one of those exceptions :/  I don't recall off-hand, but
I think Windows probably has the same problem with its context menus
for entry fields.  (But of course it has the ability to select 'Cut'
anyway, even though it's disabled).

The 'next best' alternative would be for Cut and Copy not to appear on
the menu at all when no text is selected.... dunno how technically
feasible that is, though.
Comment 4 Thomas Leonard 2002-02-13 12:54:13 UTC
This shouldn't be a problem to implement. In ROX-Filer, we just shade
the child widgets, rather than the menu items, and it works fine.

We do this mainly so that you can click a menu item to see why it's
shaded (since we have to do the messages anyway for the keyboard
short-cuts, it seems sensible to make them available via the mouse too).

Also means you can set up the short-cuts when you first sit down in
front of a new machine without having to work out how to unshade
every item in turn ;-)

I think it's most important for submenus, though. When a submenu is
shaded you should still be able to open it (even though everything
inside will also be shaded) so you can see all the functions of the
program easily.
Comment 5 Owen Taylor 2002-02-13 19:12:21 UTC
One problem with the trivial approach of drawing the menu sensitive
(and selected) and the child insensitive is that there is 
no guarantee in the GTK+ system that the foreground color for
insensitive text will be visible against the bcakground color
for selected text.
Comment 6 Owen Taylor 2002-02-13 22:52:21 UTC
Can't deal with this for the 2.0.0 release.
Comment 7 bill.haneman 2002-06-19 14:12:55 UTC
Hi:

this really *has* to be dealt with for 2.0.X release since it proves
to be an accessibility stopper.  When navigating from menu to menu,
"something" must have focus.  I think focussing the first selectable
item in the menu makes sense here, and in cases where no selectable
items are contained in the menu, selecting the menu itself makes the
most sense.
Comment 8 bill.haneman 2002-06-19 15:18:01 UTC
I lobby for Owen's suggestion "b-ii" above, with the additional note
that if a menu has no sensitive items in it, either:

aa) the menu itself should then get focus, or;
bb) the menu itself (i.e. the corresponding item on the menubar)
should be made insensitive.

(bb) above has the disadvantage that a user can't find out what an
insensitive menu might have to offer if it became sensitive, thus I
slightly prefer (aa) above.
Comment 9 Calum Benson 2002-07-11 12:43:21 UTC
Does #85796 address this, and if so can we close?
Comment 10 Owen Taylor 2002-07-11 14:15:20 UTC
I think we might still want to do something better here in the long
term; though the 2.2.0 milestone is unlikely. Bumping along
to 2.4..
Comment 11 Calum Benson 2003-06-25 23:24:30 UTC
Marking AP3 to reflect a11y team's assessment of a11y impact.
Comment 12 Calum Benson 2003-08-07 16:06:21 UTC
Apologies for spam... marking as GNOMEVER2.3 so it appears on the official GNOME
bug list :)
Comment 13 Dominic Lachowicz 2003-11-26 23:12:05 UTC
i think i'll need something along these lines for the gtk-wimp theme
engine too. 

basically, native win32 draws menuitem backgrounds using
COLOR_HIGHLIGHT for any menuitem that is prelit, regardless of whether
it is insensitive or not. right now, i believe gtk draws a distinction
- insensitive things cannot be prelit as well. therefore gtk menuitem
backgrounds get drawn gray instead of blue, and thus look a little out
of place.

maybe there's a better way to implement what i'm looking for, or maybe
i should file another bug for this RFE. any help is greatly appreciated.
Comment 14 Calum Benson 2004-10-21 12:37:36 UTC
There's some discussion about this on the gnome-accessibility and
mozilla-accessibility lists at the moment-- Mozilla makes insensitive items
navigable, and most of the screenreader users who've participated feel that it
would probably be preferable if insensitive items were navigable in GNOME, too.

http://mail.gnome.org/archives/gnome-accessibility-list/2004-October/msg00029.html

What are the chances that this really will be fixable in gtk 2.6?
Comment 15 Calum Benson 2004-10-21 16:49:06 UTC
Apologies for spam-- ensuring Sun a11y team are cc'ed on all current a11y bugs.
 Filter on "SUN A11Y SPAM" to ignore.
Comment 16 Calum Benson 2006-04-26 17:13:09 UTC
Apologies for spam... ensuring Sun a11y folks are cc'ed on all current accessibility bugs.
Comment 17 Matthias Clasen 2015-12-22 00:01:03 UTC
time to close this