[译] YUI 的浏览器分级支持策略 #47

cssmagic opened this Issue Oct 20, 2014 · 2 comments


None yet
2 participants

cssmagic commented Oct 20, 2014 edited

[译] YUI 的浏览器分级支持策略

译者札记:YUI 停止开发,宣告了一个旧王朝的结束,和一个新时代的到来。尽管如此,YUI 所倡导的“浏览器分级”策略对前端开发领域的影响仍将延续。今日重新翻出这篇文章,别有一番滋味。

About the Browser Test Baseline and Operating Systems


The Browser Test Baseline provides a baseline set of browsers that should be tested. It is designed to maximize coverage with limited testing resources by testing the smallest possible subset of browser combinations and leveraging implicit coverage from shared core browser engines. At the very least, all listed browsers should be tested in one operating system, in order to provide "baseline" coverage. Testing on multiple operating systems should be accommodated after all browsers have been verified with baseline coverage and should start with features that have known platform-specific issues. The test platforms should be chosen based on usage statistics and market trends.



The Browser Test Baseline defines the current set of browsers that should receive a verified, usable experience. However, trying to deliver the same "A-grade" experience across all tested browsers is neither cost-effective nor common. We support a tiered approach to user experience design, development, and testing, and encourage each project to define their own tiers that serve their users and their testing resources best.

“浏览器测试基准”还规定了当前哪些浏览器应该(在使用网页服务时)获得可靠的、可用的体验。不过,向所有受测浏览器提供同等“A 级”的体验,既不划算,也很难做到。我们推荐以“分层”的方式来进行用户体验的设计、开发和测试,也鼓励每个项目去定义自己的分层标准,以便更好地服务用户、更有效地利用测试资源。

Graded Browser Support: What and Why


In the first 10 years of professional web development, back in the early '90s, browser support was binary: Do you -- or don't you -- support a given browser? When the answer was "No", user access to the site was often actively prevented. In the years following IE5's release in 1998, professional web designers and developers have become accustomed to asking at the outset of any new undertaking, "Do I have to support Netscape 4.x browsers for this project?"

在专业的 Web 开发的头十年,也就是九十年代初,浏览器支持策略通常是二元化的——对于某个浏览器,你要么支持,要么不支持。当你选择“不”时,使用这款浏览器的用户往往会被你直接挡在门外。在 IE5 发布(1998 年)之后的几年里,专业的 Web 设计师和工程师在开始一个新项目时,总免不了要问一下自己:“我到底要不要支持网景浏览器 4.x 呢?”

By contrast, in modern web development we must support all browsers. Choosing to exclude a segment of users is inappropriate, and, with a "Graded Browser Support" strategy, unnecessary.

相比之下,在现代 Web 开发中,我们必须支持所有浏览器。把一部分用户挡在门外是不合适的;而且,如果有了“浏览器分级支持”策略,你也用不着这样做。

Graded Browser Support offers two fundamental ideas:


  • A broader and more reasonable definition of "support."

  • The notion of "grades" of support.

  • 对“支持”的更广泛、也更合理的定义

  • “分级”支持的概念

What Does "Support" Mean?


Support does not mean that everybody gets the same thing. Expecting two users using different browser software to have an identical experience fails to embrace or acknowledge the heterogeneous essence of the Web. In fact, requiring the same experience for all users creates an artificial barrier to participation. Availability and accessibility of content should be our key priority.

“支持”不表示所有人得到同样的结果。期望两个使用不同浏览器的用户得到完全一致的体验,这实际上违背了(或者说否认了)Web 多样性的本质。要求向所有用户提供相同的体验,这恰恰成为一道人为的壁垒,阻碍了用户的参与。内容的可用性和可访问性才是我们的首要目标。

Consider television. At the core: TV distributes information. A hand-cranked emergency radio is capable of receiving television audio transmissions. It would be counter-productive to prevent access to this content, even though it's a fringe experience.


Some viewers still have black-and-white televisions. Broadcasting only in black-and-white -- the "lowest common denominator" approach -- ensures a shared experience but benefits no one. Excluding the black-and-white television owners -- the "you must be this tall to ride" approach -- provides no benefit either.


An appropriate support strategy allows every user to consume as much visual and interactive richness as their environment can support. This approach--commonly referred to as progressive enhancement -- builds a rich experience on top of an accessible core, without compromising that core.


Progressive Enhancement vs. Graceful Degradation

渐进增强 vs 优雅降级


The concepts of graceful degradation and progressive enhancement are often applied to describe browser support strategies. Indeed, they are closely related approaches to the engineering of "fault tolerance".

渐进增强优雅降级 的概念通常用来描述浏览器支持策略。它们确实是“容错”工程中联系紧密的两种方式。

These two concepts influence decision-making about browser support. Because they reflect different priorities, they frame the support discussion differently. Graceful degradation prioritizes presentation, and permits less widely-used browsers to receive less (and give less to the user). Progressive enhancement puts content at the center, and allows most browsers to receive more (and show more to the user). While close in meaning, progressive enhancement is a healthier and more forward-looking approach. Progressive enhancement is a core concept of Graded Browser Support.

这两个概念影响着我们对浏览器支持的决策。它们反映了不同的优先顺序,因此引导着不同的讨论方向。优雅降级侧重于 表现,允许更少使用的浏览器接收更少的内容(浏览器传达给用户的也更少)。而渐进增强是把 内容 放在首位,允许大多数浏览器接收更多内容(浏览器向用户展示的也更多)。意思很接近,但渐进增强的方式更健康,而且更具前瞻性。因此,渐进增强是浏览器分级支持策略的核心概念。

What are Grades of Support?


While an inclusive definition of browser support is necessary, the support continuum does present design, development, and testing challenges. If anything goes, how do I know when the experience is broken? To address this question and return a sense of order to the system, we define grades of support. There are three grades: A-grade, C-grade, and X-grade support.

浏览器支持策略需要有一个完整的定义,支持策略的连续统一性确实对设计、开发和测试带来了挑战。一旦有任何事情变化,我如何判断产品体验是否会受到影响?为了解决这个问题,并让测试系统更具条理性,我们定义了支持的“级别”。一共有三个级别:A 级支持、C 级支持和 X 级支持。

Before examining each grade, here are some characteristics useful for defining levels of support.


Identified vs. Unknown
There are over 10,000 browser brands, versions, and configurations and that number is growing. It is possible to group known browsers together.

已知的 vs 未知的

Capable vs. Incapable
No two browsers have an identical implementation. However, it is possible to group browsers according to their support for most web standards.

有能力的 vs 能力不足的
没有两个浏览器具有完全一致的功能实现。不过,如果要根据浏览器对主流 Web 标准的支持情况来把它们分组,还是可以做到的。

Modern vs. Antiquated
As newer browser versions are released, the relevancy of earlier versions decreases.

现代的 vs 过时的

Common vs. Rare
There are thousands of browsers in use, but only a few dozen are widely used.

常见的 vs 不常见的

Three Grades of Support



C 级

C-grade is the base level of support, providing core content and functionality. It is sometimes called core support. Delivered via nothing more than semantic HTML, the content and experience is highly accessible, unenhanced by decoration or advanced functionality, and forward and backward compatible. Layers of style and behavior are omitted.

C 级是最基本的支持程度,只提供核心内容和功能。它有时也被称作“基础支持”。内容和体验的载体无非就是语义化的 HTML,虽然没有视觉装饰或高级功能作为增强,但它是高度可访问的,且具备向前和向后的兼容性。样式层和行为层将被忽略。

C-grade browsers should be identified on a blacklist.

C 级浏览器应该被明确标记在一份黑名单上。

Summary: C-grade browsers are identified, incapable, antiquated and rare. QA tests a sampling of C-grade browsers, and bugs are addressed with high priority.

总结:C 级浏览器是已知的、能力不足的、过时的和不常见的。QA 会抽样测试 C 级浏览器,并会把 bug 标记为高优先级。


A 级

A-grade support is the highest support level. By taking full advantage of the powerful capabilities of modern web standards, the A-grade experience provides advanced functionality and visual fidelity.

A 级表示最高的支持程度。充分利用现代 Web 标准的强大能力,A 级体验会提供先进的产品功能和完整的视觉效果。

A-grade browsers should be identified on a whitelist. Approximately 96% of our audience enjoys an A-grade experience.

A 级浏览器应该被明确标记在一份白名单上。大约 96% 的用户会享受到 A 级体验。

Summary: A-grade browsers are identified, capable, modern and common. QA tests all A-grade browsers, and bugs are addressed with high priority.

总结:A 级浏览器是已知的、有能力的、现代的和常见的。QA 会测试所有 C 级浏览器,并会把 bug 标记为高优先级。

(译注:YUI 目标环境一览表 中所列的各浏览器及具体版本就是 YUI 的“浏览器测试基准”中所规定的“A 级浏览器”……IE6 还在里面呢。)


X 级

X-grade provides support for unknown, fringe or rare browsers as well as browsers on which development has ceased. Browsers receiving X-grade support are assumed to be capable. (If a browser is shown to be incapable -- if it chokes on modern methodologies and its user would be better served without decoration or functionality -- then it should considered a C-grade browser.)

X 级支持主要面向那些未知的、非主流的或冷僻的浏览器,也包括那些已经停止开发的浏览器。被判为 X 级的浏览器被假定为有能力的。(如果某个浏览器表现为能力不足——比如它搞不定一些现代技术,而且其用户在缺少装饰和功能的情况下反而更舒服——那么它应该被视为 C 级浏览器。)

X-grade browsers are all browsers not designated as any other grade.

X 级浏览器就是那些没有被划为其它两类的浏览器。

Summary: X-grade browsers are assumed to be capable and modern. QA does not test, and bugs are not opened against X-grade browsers.

总结:我们假设 X 级浏览器是有能力的、现代的。QA 不会去测试 X 级浏览器,也不会记录在它们身上遇到的 bug。

The Relationship Between A-grade and X-grade Support

A 级和 X 级之间的关系

A bit more on the relationship between A-grade and X-grade browsers: One unexpected instance of X-grade is a newly released version of an A-grade browser. Since thorough QA testing is an A-grade requirement, a brand-new (and therefore untested) browser does not qualify as an A-grade browser. This example highlights a strength of the Graded Browser Support approach. The only practical difference between A-grade and X-grade browsers is that QA actively tests against A-grade browsers.

我们来进一步阐述 A 级和 X 级浏览器之间的关系:一个突然出现的 X 级浏览器很可能就是某个 A 级浏览器刚刚发布的一个新版本。由于 A 级浏览器必须进行全面的 QA 测试,那么一个刚出炉的(当然也是未测过的)浏览器还不具备 A 级浏览器的资格。这个例子凸显了浏览器分级支持策略的优势。A 级浏览器和 X 级浏览器之间仅有的实质性区别就是 QA 只对前者做积极全面的测试。


Unlike the C-grade, which receives only HTML, the X-grade receives everything that A-grade does. Though a brand-new browser might be characterized initially as a X-grade browser, we give its users every chance to have the same experience as A-grade browsers.

不像 C 级浏览器只会收到 HTML,X 级浏览器会收到 A 级浏览器会收到的所有东西。虽然一款刚出炉的浏览器刚开始可能会被定位为 X 级浏览器,但我们会尽可能让它的用户享受到与 A 级浏览器同等的体验。

Beyond the Three Grades


In recent years, we have seen a proliferation in tiers of support above and beyond the three grades identified above, where certain subsets of features are implemented only on certain subsets of browsers. Defining and implementing tiers of user experience should be done by each individual project. Overall, we promote the simplest Progressive Enhancement approach possible and discourage projects from creating new tiers without accounting for the additional costs in development, testing, and maintenance resources.


Quality Assurance (QA) Testing


Grading the browser ecosystem enables meaningful, targeted, and cost-effective QA testing. As noted, representative C-grade testing and systematic A-grade testing ensures a usable and verified experience for the vast majority of our audience. A-grade testing must be thorough and complete, while C-grade testing can be accomplished with one or two representative browsers (e.g., Netscape 4.x and Lynx), or by using a modern browser with CSS and JavaScript disabled.

对浏览器生态系统进行分级,将使 QA 测试更加有意义、有目标,且成本效率更高。如上所述,抽样型的 C 级测试和系统型的 A 级测试可以确保我们的绝大部分用户获得可用、可靠的产品体验。A 级测试必须是全面和完整的,而 C 级测试可以只在一到两款有代表性的浏览器上完成(比如网景浏览器 4.x 或 Lynx),或者用一款禁用了 CSS 和 JavaScript 的现代浏览器来模拟。

It's worth reiterating that testing resources do not examine X-grade browsers.

这里有必要再次强调,测试团队 不需要 测试 X 级浏览器。

Representative testing of the core experience is critical. If you choose to adopt a Graded Browser Support approach for your own projects, be sure your site's core content and functionality are accessible without images, CSS, and JS. Ensure that the keyboard is adequate for task completion and that when your site is accessed by a C-grade browser all advanced functionality prompts are hidden.

针对基础体验的抽样测试是至关重要的。如果你决定在你自己的项目中采用浏览器分级支持策略,请确保你的网站的核心内容和功能在缺少图片、CSS 和 JS 时仍然是可访问的;请确保键盘操作也可以完成任务;请确保 C 级浏览器在访问你的网站时,所有高级功能的提示都已经隐藏掉了。



Graded Browser Support provides an inclusive definition of support and a framework for taming the ever-expanding world of browsers and frontend technologies.


Tim Berners-Lee, inventor of the World Wide Web and director of the W3C, has said it best:

这里引用万维网发明人、W3C 主席 蒂姆·伯纳斯-李 的话再合适不过:

"Anyone who slaps a 'this page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network."

如果有人在网页上贴出“本页在某浏览器下效果最好”这样的标签,他看起来就像是在怀念以前的苦日子——就像在 Web 出现之前,那时我们几乎无法读到在其它电脑/其它软件/其它网络上写的文档。

© Creative Commons BY-NC-ND 4.0   |   我要订阅   |   我要打赏

cssmagic added the testing label Oct 21, 2014


cssmagic commented Nov 4, 2014


  • C - core
  • A - advanced
  • X - unknown

pobing commented Jan 19, 2015


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment