In my application a user can search for messages in a database. Users may select mailboxes and folders where the search will be performed. These folders are represented as a tree with checkboxes. But I've noticed that sometimes users are confused, because instead of placing a checkbox they simply select a folder and click OK. So the question is should I automatically place a checkbox on a folder when it's clicked or accept the selected folder as a search target when OK is clicked and the user hasn't placed any checkboxes?
In your case users fail to recognize system state. This type of errors are called slips. The general recommendation is to make system status more clear for the users.
One-click selection could create bad experience, as it could be used as first step for expanding or collapsing the tree. Then both selection and collapsing could become a bit tricky.
There can be different solutions. As an example I think of something like that:
To select an item user checks checkboxes. The styles of selected items are clear distinguished. If there is no selection, the
Apply button is disabled and appropriate message is displayed.
I think your first idea is the best solution: "automatically place a checkbox on a folder when it's clicked".
Why? Because then it's obvious to the user that the item is selected for searching. She can see immediately the visual feedback of the checkbox appearing or disappearing, and which folders are selected, for searching.
If instead you just searched in the clicked folder if there are no checks then you'll confuse experienced users who would think that all folders would be searched. There's also no visual indication of which folder is being searched.
There is no hard and fast rule here. As you may be discovering it depends on your target user.
My experience of hierarchy selection involves the following features and decisions.
- Selecting parents should select children
- Unselecting parents should unselect children
- Multiple children with both selected and unselected states should be the parent in a third 'indeterminate' state. This is generally the 'square-filled' checkbox in windows.
- There should only be one selection mode - item selection, or checkbox selection
- If you have a requirement for 2 selection modes, they should operate together. Selecting an item should check the checkbox, etc.
- The'Ok' button should be disabled until there is a selection to operate upon, if one is required.
- The user needs a hint as to why the button is disabled, rename your button to 'Continue' or 'Process data'. Any name that indicates that the next step is coming up based upon the selection. 'Ok' indicates that this button should be pressed when the user is happy, but is often the default 'go away, pesky dialog' button - you want to give the button greater meaning.