简明现代魔法 -> HTML超文本标记语言 -> 合理使用表单中的重置与取消

合理使用表单中的重置与取消

2010-06-30

Most Web forms would have improved usability if the Reset button was removed. Cancel buttons are also often of little value on the Web.

在大部分网页表单中,移除重置按钮会有效提升可用性,同样的,取消按钮对网页的意义也不太大。

It is one of the most basic heuristics for interaction design to support user control and freedom by allowing users an "emergency exit" out of any situation they may have entered. Undo was truly one of the greatest advances in usability.

启发式的交互设计中最基本的一点是在任何情况下为用户提供“紧急出口”,离开当前环境。撤销功能是最好的解决方法之一,基本原则只是告诉我们要提供撤销功能但并没有告诉我们怎么做。往往,不同的原则适用于不同的用户界面:

The basic rule says to support undo; it doesn't say how. More specific rules are needed for different types of user interfaces:

The Reset and Cancel buttons are the Web's attempt at mirroring these features, but users usually prefer to use the Back button instead when they want to escape from an undesired state.

网页试图通过重置和取消按钮来复制以上特性,但用户往往更愿意通过浏览器的后退按钮来离开误入的页面。

Reset: Don't Use 不要使用重置按钮!

The Web would be a happier place if virtually all Reset buttons were removed. This button almost never helps users, but often hurts them.

如果去掉所有重置按钮,网页将变为一片净土。这些按钮非但不能帮助用户,还可能伤害到他们。

Reset clears away the user's input on a Web form, but why would people want to do that? The Web is characterized by frequent movement between pages and users rarely encounter the same form twice. Thus, a Web form is almost always cleared when the user sees it. Even when a user revisits a form in a single session, it is usually faster to edit the old data than to erase it and start over.

重置功能会把用户输入到表单中的所有信息清除掉,但为什么用户要使用这样的功能呢?用户浏览网页的时候会在页面之间频繁转换,他们很少重复访问相同的表 单,因此,表单在呈现给用户的时候就是干干净净的。而当用户使用相同的进程重新访问一个表单时,编辑原有的数据往往比重新填写更便捷。

The Reset button hurts users in three ways:

重置按钮会在以下三个方面伤害用户:

Make All Form Entries Undoable 让所有输入可撤销

To eliminate the Reset button, it becomes necessary to offer users another escape route for erroneous form entries. In the case of text fields or check boxes, the user can always erase the entry and revert to the original state.

去掉了重置按钮,我们有必要为用户提供其他的修改错误输入的方式。对于文本框和选择框来说,用户可以随时输入或恢复到最初的状态。

Unfortunately, some Web forms use radio buttons and pull-down menus in a non-standard manner and do not offer a neutral choice. A classic design mistake on the Web is to have radio buttons that initially do not have a selection. Often, there is no way for the user to select a "nothing" option, once he or she has selected one of the choices. Always include an explicit radio button for the default choice and always include a selectable menu entry in pull-down menus for the default choice. Otherwise you do trap users. (See also all 13 guidelines for checkboxes and radio buttons.)

不幸的是,有些使用了非标准风格的单选框(radio button)和下拉菜单的表单并没有提供回到初始状态的选项,而这是网页设计的典型错误之一。往往,一旦用户选择了一个选项,就没有办法作出“什么都不选” 的选择。永远别忘了在单选按钮和下拉菜单中加入明确的默认选项,否则你用户的麻烦就大了。

Exception: Use Reset for Repeated Form-Filling 例外:重复输入表单的重置按钮

Reset can be useful for forms that satisfy both of the following criteria:

当同时满足以下两个条件时,重置按钮将发挥它的作用:

Even if a user were to use a form frequently, the reset button would still not be necessary if the data was mostly the same from one use to the next. In these cases, it would be easier for the user to edit the old data than to erase it and start from scratch.

即使某个用户经常使用一个表单,当填入的数据每次都很相似时重置按钮也不是十分必要的。在这种情况下编写原有的数据要比重新来过简单得多

Cancel: Use Sparingly 保守地使用取消按钮

The Web is not an application environment, and it usually doesn't have dialog boxes. Instead, the Web is a navigation environment where users move between pages of information. Since hypertext navigation is the dominant user behavior, users have learned to rely on the Back button for getting out of unpleasant situations. Whenever users arrive at pages they don't want, they slam their mouse directly onto the Back button.

网页并不像软件一样拥有对话框,而是一个用户游走于各个页面之间的导航环境。自从超文本导航成为用户的使用习惯,人们开始依赖后退按钮来逃离窘境。 每当用户误入了不想进入的页面,他们就会自然而然地把鼠标放到后退按钮上。

Because Back is such a strong behavior on the Web, it is usually not necessary to offer explicit Cancel buttons. If the user asks for something but doesn't want it, then you can be sure that it's Back button time.

因为后退是网页浏览中很常规的行为,单独的取消功能也就不是那么重要了。如果用户不喜欢当前的页面,可以肯定,后退按钮就要出场了。

Offer a Cancel button when users may fear that they have committed to something they want to avoid. Having an explicit way to Cancel provides an extra feeling of safety that is not afforded by simply leaving.

当用户害怕自己提交了不想提交的信息时,可以为他们提供取消按钮,这样能够提供给他们比直接退出更安全的的感觉。

Cancel is mainly useful for multi-step dialogs where the user has progressed past one or more pages with actions. At this time, pressing the Back button will not undo these actions and it would be better if the user would click Cancel.

在需要多步填写的表单中用户会在超过一个页面上进行输入,这时取消按钮是个不错的选择,因为后退按钮不会撤销之前的输入。

Of course, one cannot rely on having the user click Cancel, even if it is offered, so the back-end logic must be able to handle abandoned multi-step dialogs where the user decided to leave through the use of the Back button. This added complexity is one of the reasons I don't recommend trying to implement advanced applications inside a Web browser. It is better to use another form of Internet-enabled applications.

当然,不能指望用户每次都点取消,应该有一个后端/后台逻辑来处理点击后退来中断多步输入的行为。额外的复杂性是我不推荐在网页中加入复杂应用的原 因之一,更好的办法是使用另一种形式来实现。

Remove Button in Shopping Carts 购物车中的移除按钮

It is necessary to have a special button in shopping carts for removing a product. Users cannot be assumed to understand that they can cancel a purchase by buying zero copies (even though this technique should be supported as well since it does not interfere with users unless they decide to use it on their own initiative).

很有必要在购物车中添加特殊的按钮来帮助用户移除商品,我们无法知道用户是不是了解他们能够通过购买“0”件商品来取消购物。(但是反正这个小技巧 也不影响其它用户,所以还是应该实现出来给懂的人用)

Clarification: When Cancel Is Necessary 到底什么时候使用用取消按钮

Lisa Padol asks:

Lisa Padol 问道:

When you talk about cancel and reset buttons, you do not mean the stop (as in "stop the page from loading") and reset/refresh buttons, correct?

"当你讨论取消和重置按钮时并没有提及停止(即在载入时停止页面)和刷新按钮,不是吗?我觉得这不仅是可以接受的,也很必要为比如下载文件的过程加入取消按钮。"

I presume it's not only acceptable, but also required to have a cancel button for things like downloading files?

She is correct in both assumptions. The browser's Stop button is a great example of a technique to increase the user's control of the dialogue. Same for a way to interrupt file transfers or any other actions that take more than a few seconds. Designers must include such features in any applets or other design elements that can take time.

她的假定完全正确,浏览器的“停止”按钮很好地加强了用户的控制权。而对于文件传输和其它一些得花好几秒钟的操作也应该这样做。设计师必须给 Applet(网页上的Java应用)和其它耗时的设计元素都加上停止功能。

source:http://www.useit.com/alertbox/20000416.html

随机文章推荐
网站分类


注:如需转载本文,请注明出处(原文链接),谢谢。更多精彩内容,请进入简明现代魔法首页。

进入新博客
喜欢本文,就分享它吧
给我留言
您的名字:
您的邮件:
您的网站:


 

copyright © 2009 简明现代魔法    学习、分享、进步

power by Gonn 感谢所有关心和支持本站的朋友们