Closed
Bug 607224
Opened 14 years ago
Closed 14 years ago
Need the ability to have certain menu items appear only for keyboard access
Categories
(Firefox :: Disability Access, defect)
Firefox
Disability Access
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: faaborg, Assigned: enndeakin)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [target-betaN][hardblocker])
Attachments
(2 files, 4 obsolete files)
18.72 KB,
patch
|
enndeakin
:
review+
dietrich
:
approval2.0+
|
Details | Diff | Splinter Review |
3.26 KB,
patch
|
neil
:
review+
|
Details | Diff | Splinter Review |
Currently 12 traditional menu items in Firefox are redundant with controls in the main window, and these menu items are currently only present so that they can be accessed by users who rely on a screen reader or keyboard access. The 12 menu commands are: File > Open Location File > Close Window File > Close Tab Edit > Delete (available through a context menu on a text field) Edit > Select All (available through a context menu on a text field) Edit > Find Again View > Stop View > Reload History > Back History > Forward History > Home Tools > Web Search To streamline the Firefox interface, we would like to only display these 12 menu commands if the user is actively using a screen reader, or if they invoked the traditional menu using the alt key. All of the yellow items in this mockup are planned for removal from the traditional menu once we have the ability to display certain menu items based on the presence of a screen reader or keyboard access: http://people.mozilla.com/~faaborg/files/20100718-firefoxButtonDetails/menuMigration-i1.png
Reporter | ||
Comment 1•14 years ago
|
||
This will significantly streamline the Firefox interface if we get this ability, so I'm tentatively requesting blocking to find out if this is something that we want to target for Firefox 4. (we'll likely need more details on how difficult doing this is before we can make a call for that).
blocking2.0: --- → ?
Comment 2•14 years ago
|
||
(In reply to comment #0) > these menu items are currently only present so that they > can be accessed by users who rely on a screen reader or keyboard access. All of these are accessible in other ways. Even if the shortcut isn't known, the option can be accessed (and the shortcut thence discovered) via the keyboard using tab/f6, context menus, etc. > To streamline the Firefox interface, we would like to only display these 12 > menu commands if the user is actively using a screen reader, or if they invoked > the traditional menu using the alt key. I don't think anything specific needs to be done for screen reader users. First, this is all accessible and discoverable in other ways; see above. Second, screen reader users, like any other keyboard user, may well hit alt to invoke the traditional menu, in which case the latter criterion is satisfied. I think screen reader specific UI changes should be avoided, especially given these arguments. > All of the yellow items in this mockup are planned for removal from the > traditional menu once we have the ability to display certain menu items based > on the presence of a screen reader or keyboard access: When you say "traditional menu" here, do you mean the menu bar or the new Firefox menu? If you mean the former, how else can you invoke it? I thought you had to use the alt key, as the menu bar is hidden by default.
Reporter | ||
Comment 3•14 years ago
|
||
>I don't think anything specific needs to be done for screen reader users. Sure, the main consideration is trying to keep the interface consistent for these users, but if they are accessing it only through hitting alt (which makes sense now that I think about it) we can certainly use that as the single criteria for if the redundant commands are shown or not. >When you say "traditional menu" here, do you mean the menu bar or the new >Firefox menu? If you mean the former, how else can you invoke it? I thought you >had to use the alt key, as the menu bar is hidden by default. traditional menu = xp/2000 menu bar. The only way to access these commands in Windows 7 is to hit the target in the main window (back/forward buttons, location bar, etc.) Or to invoke the traditional menu bar with the alt key. The removal of these commands is primarily for the traditional menu bar on XP and 2000 when it is accessed with the mouse (to simplify the interface).
Comment 4•14 years ago
|
||
(In reply to comment #3) > Sure, the main consideration is trying to keep the interface consistent for > these users, Again, I'm not sure this is really necessary, since this is all accessible and discoverable through other means. Interfaces do change over time. However, I guess you also mean consistent with other 2000/XP applications. > but if they are accessing it only through hitting alt (which makes > sense now that I think about it) we can certainly use that as the single > criteria for if the redundant commands are shown or not. Right. To give you some context in case you didn't know, I'm a screen reader developer and user. :) Note that it's also possible to bring up the menu bar with f10 and a menu on that bar can be brought up directly by pressing, for example, alt+f for File. I guess the redundant items should be shown in that case also. > traditional menu = xp/2000 menu bar. Ah, so the menu bar is shown by default in XP/2000. I assume the Firefox menu is not shown on those operating systems?
Reporter | ||
Comment 5•14 years ago
|
||
>Again, I'm not sure this is really necessary, since this is all accessible and >discoverable through other means. Interfaces do change over time. However, I >guess you also mean consistent with other 2000/XP applications. Also just backwards consistency with how Firefox has previously behaved. People who rely on screen readers and keyboard only access are likely to be more frustrated with significant UI changes (and rightfully so, since discoverability and memory play such a larger role when you can't very quickly explore an interface or use the mouse to access a target that has moved). While some of these commands are available elsewhere (like the context menu of the page itself), I generally don't think keyboard and screen reader users are going to be very happy if they lose core functionality on the menu bar. Removing these redundant commands only really makes sense when the menu bar is viewed as a secondary interface, and the user is expected to usually rely on the surface of the main window for primary actions. For keyboard only users and users of screen readers, the menu bar becomes a primary interface. For instance, we tab straight to the location bar, bypassing the back and forward buttons. >Ah, so the menu bar is shown by default in XP/2000. I assume the Firefox menu >is not shown on those operating systems? yeah, the Firefox menu is available as an option, but it is not the default interface on XP and 2000 (for external consistency with the surrounding platform).
Comment 6•14 years ago
|
||
So we're basically looking for some way to know if a screen reader is attached to our Window, and tie that to some form of selector (JS or CSS) which we can use to determine whether or not the various XUL elements should be created, right? That's the capability, as I understand it, that we're looking for in comment 1.
Assignee | ||
Comment 7•14 years ago
|
||
Yes, a selector could be added that could be used to hide/collapse certain menuitems when the menubar was activated using the keyboard. I don't know how to detect whether a screenreader is active but that could be tied to the same selector.
Reporter | ||
Comment 8•14 years ago
|
||
I believe it is safe for us to assume that if the user is employing a screen reader, then they are also accessing the menu by using the keyboard, so we can collapse this down just to keyboard access. Adjusting the summary.
Summary: Need the ability to have certain menu items appear only for screen reader or keyboard access → Need the ability to have certain menu items appear only for keyboard access
Reporter | ||
Comment 9•14 years ago
|
||
>Yes, a selector could be added that could be used to hide/collapse certain
>menuitems when the menubar was activated using the keyboard.
Would this have any impact on direct keyboard shortcuts for the otherwise invisible menu items?
Assignee | ||
Comment 10•14 years ago
|
||
(In reply to comment #7) > Yes, a selector could be added that could be used to hide/collapse certain > menuitems when the menubar was activated using the keyboard. Actually, this approach isn't feasible as a selector can't be based on some state of a frame. I'll need to think of some other solution.
Comment 11•14 years ago
|
||
If you do resurrect the idea of a selector please consider privacy concerns, especially if we are detecting screen reader usage (not just keyboard). Fortunately it seems everyone is in agreement this bug is really just about keyboard access. Aside: folks here might also be interested in bug 492557 (post FF4).
Assignee | ||
Comment 12•14 years ago
|
||
This adds a property menu.openedWithKey which can be checked during a popupshowing handler to see if the menubar was activated/opened with a key or not. Note that the indicator is only valid for menus on menubars, but this could be extended later, for instance, to other menus such as context menus. To demonstrate, the patch shows and hides the Edit->Delete command using this flag. Thoughts on this api?
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Attachment #487121 -
Flags: feedback?(gavin.sharp)
Comment 13•14 years ago
|
||
Comment on attachment 487121 [details] [diff] [review] implement a menu.openedWithKey flag >diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc > <menu id="edit-menu" label="&editMenu.label;" >- accesskey="&editMenu.accesskey;"> >+ accesskey="&editMenu.accesskey;" >+ onpopupshowing="document.getElementById('menu_delete').collapsed = !this.openedWithKey"> I imagine we'd likely want onpopupshowing="this.setAttribute('openedWithKey', this.openedWithKey)" and use CSS to actually do the hiding? Does openedWithKey as-implemented in this patch work on Mac (e.g. what is its value if I use Ctrl+F2+Left+Down to open the menu?) Does this property only reflect the initial opening of any menu in the menubar? I.e., if I Alt+F to open file, but then mouse over "Edit", what is the value of openWithKey in the edit menu's popupshowing handler? What about when I mouse back over to "File"?
Attachment #487121 -
Flags: feedback?(gavin.sharp) → feedback+
Assignee | ||
Comment 14•14 years ago
|
||
(In reply to comment #13) > I imagine we'd likely want onpopupshowing="this.setAttribute('openedWithKey', > this.openedWithKey)" and use CSS to actually do the hiding? I wasn't. I expected one to set the hidden property similar to the way the context menu or other popupshowing handlers do. > Does openedWithKey as-implemented in this patch work on Mac (e.g. what is its > value if I use Ctrl+F2+Left+Down to open the menu?) It doesn't. Josh or Steven or someone would likely need to implement that. > Does this property only reflect the initial opening of any menu in the menubar? > I.e., if I Alt+F to open file, but then mouse over "Edit", what is the value of > openWithKey in the edit menu's popupshowing handler? What about when I mouse > back over to "File"? The openWithKey flag is set to true when a menu is opened via Alt+Key, or if a key is used to navigate between top-level menus. It is not cleared until the menubar is no longer in use. I notice I still need to add support for using the F10 key to activate the menubar.
Comment 15•14 years ago
|
||
We want to hide multiple menu items per menu, so setting a "hideforkeyboard" attribute on the menuitem itself (which can be selected using something like "menubar[openedWithKey=true] menuitem[hideforkeyboard] { display:none }") would be easier to maintain than multiple popupshowing handlers that hides menuitems by ID.
Assignee | ||
Comment 16•14 years ago
|
||
Well, if you want to use: onpopupshowing="this.setAttribute('openedWithKey', this.openedWithKey)" instead as you suggested, you certainly can.
Assignee | ||
Comment 17•14 years ago
|
||
Attachment #487121 -
Attachment is obsolete: true
Attachment #489271 -
Flags: review?(neil)
Comment 18•14 years ago
|
||
(In reply to comment #15) > We want to hide multiple menu items per menu, so setting a "hideforkeyboard" > attribute on the menuitem itself (which can be selected using something like > "menubar[openedWithKey=true] menuitem[hideforkeyboard] { display:none }") would > be easier to maintain than multiple popupshowing handlers that hides menuitems > by ID. [Does that actually work on the Mac?]
Assignee | ||
Comment 19•14 years ago
|
||
I don't think this should do anything on Mac and would always show the items. Personally, I don't think we should implement this at all on any platform.
Reporter | ||
Comment 20•14 years ago
|
||
We really don't need commands like History > Back (regardless of the OS) unless that is the main way the user actually goes back. All of the commands in question are redundant with large targets in primary UI.
Comment 21•14 years ago
|
||
Comment on attachment 489271 [details] [diff] [review] Add F10 support as well I found one case where this didn't work - use Alt on its own to activate the menu (like F10) then hit an access key. (Incidentally this works with F10.) One thing I realised I forgot to check was hitting F10 twice then clicking. Apart from that the patch looks OK.
Attachment #489271 -
Flags: review?(neil) → review-
Comment 22•14 years ago
|
||
(In reply to comment #21) > One thing I realised I forgot to check was hitting F10 twice then clicking. This works, of course. The property openedWithKey only applies to whether the menubar was opened by key; I assume it's available on all the menus as a convenience method, and/or because the menubar doesn't have a box object available to expose it.
Assignee | ||
Comment 23•14 years ago
|
||
(In reply to comment #22) > The property openedWithKey only applies to whether the menubar was opened by > key; I assume it's available on all the menus as a convenience method, and/or > because the menubar doesn't have a box object available to expose it. That's correct. In the future the property could be expanded to support other sorts of menus.
Assignee | ||
Comment 24•14 years ago
|
||
Attachment #489271 -
Attachment is obsolete: true
Attachment #490558 -
Flags: review?(neil)
Comment 25•14 years ago
|
||
Comment on attachment 490558 [details] [diff] [review] Also add Alt by itself support >diff --git a/layout/xul/base/src/nsXULPopupManager.cpp b/layout/xul/base/src/nsXULPopupManager.cpp Given that the premise of the property is specific to whether the initial menubar activation was by keyboard, I'd prefer that this change isn't made.
Attachment #490558 -
Flags: review?(neil) → review+
Assignee | ||
Comment 26•14 years ago
|
||
Attachment #490558 -
Attachment is obsolete: true
Attachment #490582 -
Flags: review+
Updated•14 years ago
|
Whiteboard: [target-betaN]
Comment 27•14 years ago
|
||
Per comment #1, this isn't critical, so not blocking on it. Will a+ the patch though.
Updated•14 years ago
|
Attachment #490582 -
Flags: approval2.0+
Updated•14 years ago
|
blocking2.0: ? → betaN+
Whiteboard: [target-betaN] → [target-betaN][d?]
Comment 28•14 years ago
|
||
Alex: it's unclear to me what the desired end-user goal is here. I believe that it's that: - we want the keyboard shortcuts to continue to work - we want to remove the commands from the menus so they're not cluttered - we want the commands to show up in the menus if there is a screenreader Is that right?
Comment 29•14 years ago
|
||
My impression is that this bug is about all keyboard users (as opposed to screenreader users specifically) as per comment 8.
Reporter | ||
Comment 30•14 years ago
|
||
>Alex: it's unclear to me what the desired end-user goal is here. 1) this should have absolutely no effect on direct access keyboard shortcuts, like accel-t, accel-p, etc. 2) when the traditional menu is invoked using the mouse, certain items should not appear (scroll to the bottom of this mockup, note the pink items: http://people.mozilla.com/~faaborg/files/firefox4Mockups/visualBugs/firefoxMenu/firefoxMenu.htm ) 3) when the traditional menu is invoked with the keyboard (alt, alt-f, alt-e, etc), those menus items in pink should appear in the menu.
Updated•14 years ago
|
Whiteboard: [target-betaN][d?] → [target-betaN][d?][has patch][has review]
Reporter | ||
Comment 31•14 years ago
|
||
Can we get this checked in?
Comment 32•14 years ago
|
||
This patch involved an IID change, which requires special approval from release drivers after API freeze (beta7). It looks to me that this could have been done with nsIMenuBoxObject_MOZILLA_2_0 and avoid the IID change this late in the game. I think this should be backed out.
Comment 33•14 years ago
|
||
I don't think it was checked in, so it can't be backed out. We should rewrite it with the new API, though.
Whiteboard: [target-betaN][d?][has patch][has review] → [target-betaN][d?][has patch][has review][hardblocker]
Updated•14 years ago
|
Whiteboard: [target-betaN][d?][has patch][has review][hardblocker] → [target-betaN][d?][needs new patch][hardblocker]
Comment 34•14 years ago
|
||
(In reply to comment #33) > I don't think it was checked in, so it can't be backed out. http://hg.mozilla.org/mozilla-central/rev/e1a695a10138
Assignee | ||
Comment 35•14 years ago
|
||
This patch uses a separate interface. I didn't use the 2.0 form as I think this interface may want to be implemented by menubars/popups in the future. But maybe that doesn't matter.
Comment 36•14 years ago
|
||
Neil, is the new patch ready for review?
Reporter | ||
Comment 37•14 years ago
|
||
Does this patch cover all platforms?
Assignee | ||
Comment 38•14 years ago
|
||
I'm still debating whether to just use the special 2.0 temporary interface form. This patch covers Windows and Linux. It isn't possible to implement this on Mac.
Assignee | ||
Comment 39•14 years ago
|
||
Attachment #503472 -
Flags: review?(neil)
Comment 40•14 years ago
|
||
Comment on attachment 503472 [details] [diff] [review] Patch with _MOZILLA_2_0_BRANCH instead >+interface nsIMenuBoxObject_MOZILLA_2_0_BRANCH : nsISupports Why not make this inherit from nsIMenuBoxObject?
Updated•14 years ago
|
Attachment #503472 -
Flags: review?(neil) → review+
Assignee | ||
Comment 41•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/b27366868c80
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Reporter | ||
Comment 42•13 years ago
|
||
Follow up bug 626825 for actually hiding the menu commands.
Updated•13 years ago
|
Whiteboard: [target-betaN][d?][needs new patch][hardblocker] → [target-betaN][hardblocker]
Comment 43•13 years ago
|
||
I do not see that the "Close window" menu option is redundant. Maybe I am too blind to see, but where can I find this option in the main window? Is there some config option to get the old behavior back?
Updated•13 years ago
|
Attachment #503369 -
Attachment is obsolete: true
Comment 44•13 years ago
|
||
I use the close window option all the time. Consistency is often part of a good user interface. Removing commands "because you can access them in other ways and this makes it less cluttered" is stupid.
Comment 45•12 years ago
|
||
I'm not sure if this is the right place to make this comment -- there's so many bugz containing gripes against this keyboard vs mouse activation of menus issue -- but it seems relevant after comment 44. There is a situation I encounter regularly in which it would be nice if the mouse-clicked File menu always had a Close or Close Tab selection (Ctrl+F4 equivalent). When I visit a page that contains a Java applet, if I click something within the confines of the applet, control gets trapped within the applet. There are no keyboard combinations that allow you to escape the applet to navigate the web page outside the applet, nor can you activate anything off the Menu Bar via the keyboard alone. The problem is aggravated when you have only a single tab going in the current window, so you DO NOT HAVE the little tab thingy at the top of the page with the X you can click with the mouse to close the tab. I have also found that clicking around on the page outside the applet doesn't always "get you out of jail" from the applet. There is a combination problem with this. I have found (this may no longer be true but habits are hard to break) that if you click the Windows control X in the upper right corner of the window or, equivalently, the Close selection on the drop down menu from the icon in the upper left corner of the window, this makes FFx reopen this window next time you launch the browser, as if it thinks it needs to resume an interrupted session. What's that called? Session restore? FFx treats a "brute force" window close as reason to restore the session on your next browser launch. If, on the other hand, you Ctrl+F4 out of a page, FFx doesn't put the page into the Session Restore candidate list (or whatever the terminology for this is -- I hope I'm making myself clear). Try it yourself. Here's one page where I encounter the problem daily. http://www.global-view.com/forex-trading-tools/usindex_charts.html So the bottom line is that the Ctrl+F4 equivalent selection really would be nice to have in the File menu no matter how you drop the menu down.
You need to log in
before you can comment on or make changes to this bug.
Description
•