GNOME Bugzilla – Bug 356068
Provide a command for identifying the default button within a dialog
Last modified: 2009-10-21 17:19:41 UTC
Some dialog boxes have a "default" button (i.e. the button that will be activated if you press Enter from anywhere within the dialog). Being able to identify the default button within a dialog can save the user a lot of tabbing, especially within large dialogs such as Evolution's Contact Editor. Perhaps this could be part of the information provided when "Where Am I?" is used in a dialog box? Thanks!!
Good idea I think this would be good info to add at the end of the where am I output.
Add accessibility keyword. Apologies for spam.
Joanie gave me some examples of dialog that have a default button (thanks!) "The very dialog that inspired that RFE! Go into Evolution and press Control Shift C to create a new contact. As soon as you fill out a single character in the Full Name text box, you can use Enter to press the OK button. I often fill out the full name and email address and that's it. Being able to ask Orca if it's safe to press Enter rather than having to Tab down to OK would be cool. A couple more samples would be OOo's Open and Save As dialogs. Oh, and in Gaim: Control C for the Join a Chat dialog. As soon as you type in the chat room, you can press Enter for the Join button."
Here's the component ancestry for the Ok button on the Contacts dialog in Evolution: ================================================================= +-name='evolution-2.6' role='application' state='' relations='' +-name='Contact Editor - a' role='dialog' state='ACTIVE ENABLED RESIZABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='filler' state='ENABLED HORIZONTAL SENSITIVE SHOWING VISIBLE' relations='' +-name='OK' role='push button' state='ENABLED FOCUSABLE FOCUSED SENSITIVE SHOWING VISIBLE' relations='' ================================================================= Here's the complete application accessible component hierarchy: ================================================================= +-name='evolution-2.6' role='application' state='' relations='' +-name='Evolution - Contacts' role='frame' state='ENABLED RESIZABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='menu bar' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name='File' role='menu' state='ENABLED SELECTABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Edit' role='menu' state='ENABLED SELECTABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='View' role='menu' state='ENABLED SELECTABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Actions' role='menu' state='ENABLED SELECTABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Search' role='menu' state='ENABLED SELECTABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Help' role='menu' state='ENABLED SELECTABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='tool bar' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED RESIZABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='New' role='push button' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name='Send / Receive' role='push button' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='SHOWING VISIBLE' relations='' +-name='Print' role='push button' state='FOCUSABLE SHOWING VISIBLE' relations='' +-name=None role='panel' state='SHOWING VISIBLE' relations='' +-name='Delete' role='push button' state='FOCUSABLE SHOWING VISIBLE' relations='' +-name=None role='panel' state='SHOWING VISIBLE' relations='' +-name='Stop' role='push button' state='FOCUSABLE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='split pane' state='ENABLED FOCUSABLE HORIZONTAL SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='page tab list' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='page tab' state='ENABLED SELECTABLE SELECTED SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED RESIZABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='filler' state='ENABLED HORIZONTAL SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='icon' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='unknown' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name='No contacts' role='label' state='ENABLED MULTI_LINE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='scroll pane' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Contact Source Selector' role='tree table' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE MANAGES_DESCENDANTS' relations='' +-name='Mail' role='toggle button' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Contacts' role='toggle button' state='ARMED CHECKED ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Calendars' role='toggle button' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Memos' role='toggle button' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Tasks' role='toggle button' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='JESCS' role='toggle button' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='page tab list' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='page tab' state='ENABLED SELECTABLE SELECTED SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED RESIZABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='page tab list' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='page tab' state='ENABLED SELECTABLE SELECTED SHOWING VISIBLE' relations='' +-name='evolution addressbook' role='canvas' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED HORIZONTAL SENSITIVE SHOWING VISIBLE' relations='' +-name='Search Type' role='combo box' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED HORIZONTAL SENSITIVE SHOWING VISIBLE' relations='' +-name='Search' role='text' state='EDITABLE ENABLED FOCUSABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name='Find Now' role='push button' state='FOCUSABLE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name='Clear' role='push button' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='split pane' state='ENABLED FOCUSABLE SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='scroll pane' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='layered pane' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='FOCUSABLE SHOWING VISIBLE' relations='' +-name='current addressbook folder has 0 cards' role='panel' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Contact Editor - a' role='dialog' state='ACTIVE ENABLED RESIZABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='page tab list' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Contact' role='page tab' state='ENABLED MULTI_LINE SELECTABLE SELECTED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='filler' state='ENABLED HORIZONTAL SENSITIVE SHOWING VISIBLE' relations='' +-name='Image' role='push button' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name='Full Name...' role='push button' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=' Personal' role='combo box' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='LABELLED_BY' +-name=None role='combo box' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='LABELLED_BY' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE SELECTABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='LABELLED_BY' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='LABELLED_BY' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='LABELLED_BY' +-name='Categories' role='push button' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Where:' role='label' state='ENABLED MULTI_LINE SENSITIVE SHOWING VISIBLE' relations='LABEL_FOR' +-name='File under:' role='label' state='ENABLED MULTI_LINE SENSITIVE SHOWING VISIBLE' relations='LABEL_FOR' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='LABELLED_BY' +-name='Nickname:' role='label' state='ENABLED MULTI_LINE SENSITIVE SHOWING VISIBLE' relations='LABEL_FOR' +-name=None role='separator' state='ENABLED HORIZONTAL SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name='Email' role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name='Wants to receive HTML mail' role='check box' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='LABELLED_BY' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='LABELLED_BY' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='LABELLED_BY' +-name='Other' role='combo box' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Other' role='combo box' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='LABELLED_BY' +-name='Home' role='combo box' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Work' role='combo box' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Email' role='label' state='ENABLED MULTI_LINE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED SENSITIVE SHOWING VERTICAL VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name='Business Fax' role='combo box' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Mobile Phone' role='combo box' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Home Phone' role='combo box' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Business Phone' role='combo box' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='LABELLED_BY' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='LABELLED_BY' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='LABELLED_BY' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='LABELLED_BY' +-name=None role='filler' state='ENABLED HORIZONTAL SENSITIVE SHOWING VISIBLE' relations='' +-name='Telephone' role='label' state='ENABLED MULTI_LINE SENSITIVE SHOWING VISIBLE' relations='' +-name='Telephone' role='push button' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Instant Messaging' role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='panel' state='ENABLED SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='LABELLED_BY' +-name='GroupWise' role='combo box' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='LABELLED_BY' +-name='ICQ' role='combo box' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='LABELLED_BY' +-name='Yahoo' role='combo box' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='text' state='EDITABLE ENABLED FOCUSABLE SENSITIVE SHOWING SINGLE_LINE VISIBLE' relations='LABELLED_BY' +-name='AIM' role='combo box' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Instant Messaging' role='label' state='ENABLED MULTI_LINE SENSITIVE SHOWING VISIBLE' relations='' +-name='Personal Information' role='page tab' state='ENABLED MULTI_LINE SELECTABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Mailing Address' role='page tab' state='ENABLED MULTI_LINE SELECTABLE SENSITIVE SHOWING VISIBLE' relations='' +-name=None role='filler' state='ENABLED HORIZONTAL SENSITIVE SHOWING VISIBLE' relations='' (*)name='OK' role='push button' state='ENABLED FOCUSABLE FOCUSED SENSITIVE SHOWING VISIBLE' relations='' +-name='Cancel' role='push button' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' +-name='Help' role='push button' state='ENABLED FOCUSABLE SENSITIVE SHOWING VISIBLE' relations='' =========================================================================== Now we need to determine if there is anything there that can tell us what the default component is.
We now have ATK_STATE_DEFAULT (and the corresponding SPI_STATE_DEFAULT). So now it's up to gtk+/gail/application to implement it.
Thanks Bill. Is there a GNOME Bugzilla bug/refe for this gtk+/gail/application work?
Perhaps we should consider adding this to the "where am I" information if it is available? Thoughts?
I've created bug #363450 against atk for this functionality to be implemented. Blocking this one against that, and adjusting the bug summary to reflect this.
Removing target milestone from [blocked] bugs. We have little control over them, so we're better off letting priority and severity be our guide for poking the related components.
Li Yuan just checked in a patch to gail adding IS_DEFAULT as a possible state for buttons. We're unblocked (woo hoo!). I'll work on adding this to the whereAmI info for dialogs as per Mike's comment #7.
Created attachment 92893 [details] [review] first pass at this I chatted with Mike via IM. He wanted the default button to be associated with the double-click (unmodified) whereAmI. Done. Spot checked in Evolution, OOo Writer, Gedit, Gaim, Gnome-terminal, and Firefox. Questions/Comments: 1. I assume that we only want to speak the default button if it has STATE_SENSITIVE. For example, if you are in the New Contact dialog in Evolution but haven't put in a name, the OK button has STATE_IS_DEFAULT, but it's also grayed out. (Note, to test this condition, you'll want the fix in bug #462650). This patch only reports the default button if it's actually sensitive. 2. This patch says absolute nothing if it can't find a button that's has both STATE_IS_DEFAULT and STATE_SENSITIVE. Is that what we want or should Orca give a more demonstrative pronouncement of the fruitless nature of its search? :-) 3. I'm perfectly happy with having this associated with the unmodified double-click, but having played around with this during testing.... I'm going to toss out the following for consideration: Would it make sense for the default button to be associated with the OrcaKey modified double click? Rationale: a. Unmodified double click is to get more information about the thing you're on (right?) b. Modified double click is to get information from something you're not on: The status bar of the thing you're in. c. I believe the presence of status bars and default buttons will be mutually exclusive (dialog boxes and file choosers lack status bars, right?). Mike, please comment and test. :-) Thanks!
oops, I forgot to mention, you'll need the current gail to get Li's patch. If you have a fully-updated Gutsy you have the patch already.
Mike IMed me to ask if I had tried this in Feisty because this wasn't working for him. I hadn't. Now I have. Here's what I did: 1. Grabbed the latest gail from svn trunk, built, and rebooted. 2. Grabbed the latest orca from svn trunk and applied the patch. 3. Tests: a. Gnome terminal: File menu -> New Profile When focus is in the Profile Name entry *but nothing has been typed*, the default button is Create, but it's grayed out and -- in my mind useless in that state. Therefore it should not be reported. Which it's not. As soon as I type a character in that entry, however, and double-click KP_Enter Orca tells me the info about the entry. At the end of that it tacks on "default button is create". b. Firefox 3, the Add BookMark dialog. The Add button's always default and sensitive whether you type a name or not. If I double-click KP_Enter from the Name entry, Orca tells me the info about the Name entry. At the end of that it tacks on "default button is add". c. Gedit: Open dialog. When pressed from the table of files, double-click KP_Enter tells me the info about the table of files and then tacks on "default button is open". d. Gedit: Find dialog As long as something has been typed as the string to find, double-click KP_Enter reports the relevant control info and then tacks on "default button is find". So, Mike, what dialog boxes are you testing with? Or is my understanding of what you wanted the functionality to be incorrect? Thanks!
In an earlier phone conversation Joanie pointed out that applications that have status bars do not have default buttons. On the other side she said that dialog boxes don't have status bars. We decided that allowing orca's read status bar key would work nicely for speaking the default button in dialogs as well.
I checked in a fix for this as part of bug 468098. It works in Gutsy on all of my machines. It worked on my Feisty box with the latest Gail. We still need to figure out what's up in terms of Mike's Feisty box, but there's no need to have two bugs open for it. So I'm closing this one as FIXED. Let's continue discussion on bug 468098.
*** Bug 599219 has been marked as a duplicate of this bug. ***