第 508 条和样式表
我对样式表和第 508 节很陌生。我正在尝试理解它。
据我了解,样式表提供了一些有关如何显示网页的特定细节。例如,它可以提及用于页面中的所有元素/特定元素的颜色、字体和大小。
第 508 节中的标准之一指出,我们不应覆盖用户在操作系统或浏览器级别可能进行的字体、颜色和对比度的特定设置。在这种情况下,我们应该如何尊重这一点呢?拥有样式表的想法是拥有我们自己的独特、更令人印象深刻且可用的样式。因此,我们将在样式表中拥有自己的一组字体、颜色等。
如果要满足这个标准,我们不应该覆盖 UI 中的任何字体/颜色/对比度,这与使用样式表的想法之一有点矛盾。不是吗?那么我们是否应该提供另一个使用高对比度细节的样式表(也是我们自己的字体、颜色等集),或者提供一个选项来使用我们的 UI 而无需样式表?请指教。
提前致谢。
I am new to style sheets and Section 508.I am trying to understand it.
As i understand, style sheets provide some specific set of details on how to display a web page. For example, it can mention color, font and size to be used for all elements/specific elements in a page.
One of the criteria in section 508 states that, we should not override user specific settings of font, color and contrast they may make at OS or browser level. In this case, how should we go about respecting this? The idea of having a style sheets is to have a unique, more impressive and usable style of our own. So we will have our own set of font, color etc., in our style sheets.
If this criteria is to be met, we should not override any font/color/contrast in our UI which is a bit contradictory to one of the ideas of using style sheets. Isnt it? So should we provide another style sheet which uses high-contrast details which is also our own set of fonts, colors etc., or provide an option to use our UI without style sheets? Please advice.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
样式表本身(或者至少 CSS)已经为此提供了合适的机制:用户样式表。用户可以在其用户代理中设置任何样式,如果带有
!important
规则后缀,则会覆盖作者的定义。此外,关于字体,作者可以指定用户指定的字体系列。其中包括
serif
、sanf-serif
和monospace
。您还可以使用系统颜色来指定前景和背景元素的颜色以确保对比度,例如
这将确保系统定义颜色的易读性和使用。
Style sheets themselves (or at least CSS) already provide a suitable mechanism for this: User style sheets. A user can set any styles within his user agent, which, if suffixed with the
!important
rule, override the author's definitions.Furthermore, regarding fonts, authors can specify font families which are user-specified. Those are, among others,
serif
,sanf-serif
andmonospace
.You can also use the system colors to specify foreground and background colors of elements to ensure contrast, such as
This would ensure legibility and use of the system-defined colors.
您使用什么语言?有些语言允许您以编程方式更改对象的样式;其他的你必须使用javascript。您不能依赖它来实现 508c 合规性。
What language are you using? Some languages allow you to change the styles on an object programatically; others you'll have to use javascript. Which you can't rely on for 508c compliance.
它们实际上比其他任何东西都更具有指导意义。如果无论默认字体大小或其他是什么,您的设计都效果良好,那么请随意保留它。如果没有,没什么大不了的。有整页缩放、屏幕反转,如果其他方法都失败了,如果有人真的不喜欢你的设计,可以关闭 CSS(或 CSS 覆盖)。
要记住的最重要的一点是,您的用户可以拥有与您习惯的不同的默认值。如果更改前景色,您还应该更改背景色,反之亦然,因为您的用户可能将它们设置为与您期望的颜色不同的颜色。如果您在一处设置文本的字体大小,则应该在所有地方(最好在
body
或html
中)设置文本的字体大小,并且一般来说,当您更改一个位置时设置,以确保它永远不会与用户的默认设置发生冲突,并在必要时覆盖这些默认设置。They're really more guidelines than anything else. If your design works well no matter what the default font size or whatever is, then feel free to keep it at that. If not, no biggie. There's whole-page zooming, screen inversion, and if all else fails, turning off CSS (or CSS overriding), if someone really dislikes your design.
The most important part to remember is that your user can have defaults that are different from what you're used to. If you change a foreground color, you should also change the background color, and vice versa, since your user might have set them to different colors than you expect them to be. If you set the font size of text in one place, you should set the font size of text everywhere (preferably in
body
orhtml
) And in general, when you change one setting, to make sure it could never conflict to your users' defaults, overriding those defaults if necessary.样式表实际上可以帮助您遵守 508、WCAG 和(在英国)残疾歧视法案。还值得注意的是,在许多情况下,它们比指导方针更强大,它们是法律。
您使用样式表使页面看起来很不错,如果用户有特殊需要,他们可以选择“关闭”样式表,甚至用自己的样式表替换它们。
考虑到这一点,您可以在样式表中设置您喜欢的任何值(请参见下面的注释),但也可以检查您的网站在完全关闭时是否正常工作(您可以通过取出对样式表的引用来测试它,或者如果您使用 Firefox,带有 Web 开发工具栏)。
注意:当我说“无论您喜欢什么值”时,您仍然应该尝试确保您选择的值至少提供 80% 的对比度 - 即不是黄色背景上的白色文本等
Stylesheets actually help you to adhere to 508, WCAG and (in the UK) the disibility discriminations act. It is also worth noting that in many cases they are much stronger than just guidelines, they are law.
You use your stylesheet to make your page look ace, and if a user has a special need, they can choose to "switch off" stylesheets, or even replace them with their own.
With this in mind, you can set whatever values you like in your stylesheet (see note below) but also check that your website works when you switch it off completely (you can test it by taking out the reference to your stylesheet, or if you are using Firefox, with the Web Developer Toolbar).
Note: When I say "whatever values you like", you should still be trying to ensure that the values you select give at least 80% contrast - i.e. not white text on a yellow background etc
BBC 很好地解释了许多可访问性标准并提供了参考。我认为此页面可能对您有帮助: http://www.bbc .co.uk/guidelines/futuremedia/accessibility/colour_contrast.shtml
The BBC did a very nice job explaining a lot of accessibility standards and making references. I think this page could be helpful to you: http://www.bbc.co.uk/guidelines/futuremedia/accessibility/colour_contrast.shtml