在高对比度模式CSS实际发生了什么? [英] What actually happens to CSS in high contrast mode?

查看:266
本文介绍了在高对比度模式CSS实际发生了什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以解释在高对比度模式下CSS会发生什么情况?



,但它似乎不再存在。



通常我看到有两种方法:


  1. 检测HCM(高对比度模式)并相应地调整CSS

  2. 使CSS更通用以使其在每种模式下工作

在这两种情况下,我真的想知道在高对比度模式中发生的变化。



$ b

解决方案

您已定义您的形式元素的文本和背景的颜色?



以下是来自参考列表Accessiweb 2.1的相关标准:在每个网页上,元素背景和字体的颜色的CSS声明是否正确使用?(Silver level等于WCAG 2.0 AA)

相关WCAG 2.0故障技术是 F24:指定前景色而不指定背景颜色,反之亦然



最近关于对比模式的WebAIM帖子: http://webaim.org/blog/high-contrast/



关于Google首页:Google以浏览器嗅探和大量修改而闻名页面取决于浏览器,登录他们的服务或不,JS激活或不激活。它甚至可以使用SPDY协议而不是HTTP(虽然这不会改变浏览器本身接收的内容)。

我不会考虑这家公司的页面用于浏览器之间的比较);


Can anyone explain what happens to CSS in high contrast mode?

http://hardlikesoftware.com/weblog/2009/11/04/css-sprites-vs-high-contrast-mode/

In high contrast mode all background images and colors are ignored — replaced with high contrast colors such as white on black or black on white. The other issue is that background images are not always printed.

Is there anything more than this?

I have login form that looks suboptimal and I am trying to investigate.

Untill recently there were https://www.google.com/search?q=axs+aol+accesibility+library but it doesn't seem to exist any longer.

Generally I see there two approaches:

  1. Detect HCM (high contrast mode) and adjust CSS accordingly
  2. Made CSS more generic to let it work in every mode

In either case I would really like to know what happens in high contrast mode in terms of changes to CSS.

As you see the behaviour varies so your expertise will be appreciated.

解决方案

Did you define colors for both text and background for your form elements?

Here's a relevant criteria from reference list Accessiweb 2.1 : On each Web page, are CSS declarations for colours for element background and fonts used properly? (Silver level equals WCAG 2.0 AA)
Relevant WCAG 2.0 Failure Technique is F24: specifying foreground colors without specifying background colors or vice versa

A recent WebAIM post about contrast mode: http://webaim.org/blog/high-contrast/

About the Google homepage: Google is known for browser sniffing and heavily modified pages depending on browser, logged on their services or not, JS activated or not. It'll even use SPDY protocol instead of HTTP (though that doesn't change the content received by the browser per se).
I wouldn't consider pages from this company for comparisons between browsers ;)

这篇关于在高对比度模式CSS实际发生了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆