WCAG 2.0 and Link Colors (转载)

WCAG 2.0 requires that the foreground and background colors have a 4.5:1 contrast ratio at Level AA and a 7:1 contrast ratio at Level AAA. You can use our contrast checker tool to determine what the ratio is between any foreground and background color.

WCAG 2.0 also requires (at Level A) that color not be used as the sole method of conveying content or distinguishing visual elements. They further define this requirement for links with Technique G183, which states, “Using a contrast ratio of 3:1 with surrounding text and providing additional visual cues on focus for links or controls where color alone is used to identify them.” This means that if you do not underline your links (or provide some other non-color designator for links), that the links must be sufficiently different in contrast from the surrounding text.

So if you combine these two requirements, in order to be Level AA conformant, your page must have all of the following:

  • A 4.5:1 contrast between the non-link text color and the background.
  • A 4.5:1 contrast between the link text color and the background.
  • A 3:1 contrast between the link text color and the surrounding non-link text color.

In other words, your link color has to be significantly different from the background color AND the surrounding text color, which also has to be significantly different from the background color.

点击这里查看文章详细 »

原文链接(132 views)|沙发已被占领(1)

网页制作必备利器之二(HTML Compress)

对于访问量稍微大一点的网站,前端尽可能做的就是压缩代码的体积。

在CSS JS都已经压缩的基础上,我们还可以对于HTML代码进行压缩,看看谷歌或者微软的首页,他们连换行都没有。  :)

在一般情况下,这种压缩都是在服务器端进行处理,但有的时候,我们的服务器端不具备这样的条件,我们就只有手动压缩了。  :(

顾名思义,HTML Compress 就是做这种工作的。

老规矩,先放出下载地址。

国外空间:http://rapidshare.com/files/178937109/HTML_Compress_5_setup_patch.zip.html

国内空间:http://share.138.io/get/7486f4f8f8883f54f471bf51c.html

最后,我简单说一下如何使用。

1、首先备份需要压缩的文件(必须)

2、打开HTML压缩工具。

3、如下图所示,左侧白色按钮为添加单个文件,右侧黄色按钮为添加多个文件。

compress_1

4、点击压缩

compress_2

5、压缩完成。

BTW:补丁已经放入,注册表文件可编辑为你喜欢的东东。 :twisted:

原文链接(284 views)|沙发已被占领(1)