javascript的可访问性 [英] accessability of javascript

查看:69
本文介绍了javascript的可访问性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个网页,当我将鼠标移到链接上时,

描述文本会显示在链接下方。例如。也许做一个输入

type =" text"链接下面的字段,并执行类似

onhover =" document.something.value =''what''" ;.


我会当下拉菜单设置为特定项目时,也希望页面的另一部分仅显示表单元素

。我可以轻松地使用display:none来完成这个




不幸的是,我不确定这样的东西是如何可以访问的。

事实上,它似乎是javascript和真正可访问的网站(例如,

甚至可以访问盲人和需要屏幕阅读器的人)只需

don''一起去。这是正确的还是有一些方法可以使一个

的网站具有交互性(好,排序)和可访问性,我不是很想知道它们是什么?

解决方案

yawnmoth写道:

我想制作一个网页,当我将鼠标移到a链接,
说明文字显示在链接下方。例如。也许做一个输入
type =" text"链接下方的字段,并执行类似
onhover =" document.something.value =''whatever''的操作。


在档案馆搜索''工具提示'',这个主题有很多帖子。


我也想制作当下拉菜单设置为特定项目时,页面的另一部分仅显示表单元素。我可以很容易地用display:none来完成这个。

不幸的是,我不确定这样的东西是如何可访问的。
实际上,它似乎是javascript和真正可访问的网站(例如,即使是那些盲人和需要屏幕阅读器的人也可以访问)只是不要一起去。这是正确的还是有一些方法可以使一个
网站既具有交互性(嗯,sorta)又可访问我不知道?




''JavaScript''和''access''并不是互相排斥的。


首先让网站完全可访问,然后将脚本添加到第二页

增强了那些可以利用脚本支持的人

提供。

-

Rob


yawnmoth写道:

...当我将鼠标移动到...时...
< snip>不幸的是,我不确定如何做这样的事情。



< snip>


之一在创建

可访问网页时您必须考虑的事情是用户可能与他们的

计算机进行交互的方式。他们可能根本没有使用鼠标(通过选择或

无法成功操作)。


Richard。


" yawnmoth" < TE ******* @ yahoo.com>在消息中写道

news:11 ********************* @ y43g2000cwc.googlegro ups.com ...

我想创建一个网页,当我将鼠标移到链接上时,
描述文本会显示在链接下方。例如。也许做一个输入
type =" text"链接下面的字段,并执行类似
onhover =" document.something.value =''whatever''"。




为什么不使用标题属性?更简单易用。
http://www.w3.org/TR/html4/struct/links.html#h-12.1.4


I''d like to make a webpage such that when I move my mouse over a link,
description text appears below the link. eg. maybe make an input
type="text" field below the links and do something like
onhover="document.something.value=''whatever''".

I''d also like to make another part of the page only show form elements
when a drop down menu is set to a particular item. I can do this
easily enough with display: none.

Unfortunately, I''m not sure how accessable doing stuff like this is.
In fact, it seems like javascript and truely accessable websites (eg.
accessable even to those who are blind and need screenreaders) just
don''t go together. Is this correct or is there some way to make a
website both interactive (well, sorta) and accessable that I''m not
aware of?

解决方案

yawnmoth wrote:

I''d like to make a webpage such that when I move my mouse over a link,
description text appears below the link. eg. maybe make an input
type="text" field below the links and do something like
onhover="document.something.value=''whatever''".
Search the archives for ''tooltip'', there are many posts on the subject.

I''d also like to make another part of the page only show form elements
when a drop down menu is set to a particular item. I can do this
easily enough with display: none.

Unfortunately, I''m not sure how accessable doing stuff like this is.
In fact, it seems like javascript and truely accessable websites (eg.
accessable even to those who are blind and need screenreaders) just
don''t go together. Is this correct or is there some way to make a
website both interactive (well, sorta) and accessable that I''m not
aware of?



''JavaScript'' and ''accessible'' aren''t mutually exclusive.

Make the website fully accessible first, then add script second to
enhance it for those who can take advantage of the scripting support
provided.
--
Rob


yawnmoth wrote:

... such that when I move my mouse over ... <snip> Unfortunately, I''m not sure how accessable doing
stuff like this is.


<snip>

One of the things that you will have to think about when creating
accessible web pages is how the user may be interacting with their
computer. They may not be using a mouse at all (through choice or an
inability to successfully manipulate one).

Richard.


"yawnmoth" <te*******@yahoo.com> wrote in message
news:11*********************@y43g2000cwc.googlegro ups.com...

I''d like to make a webpage such that when I move my mouse over a link,
description text appears below the link. eg. maybe make an input
type="text" field below the links and do something like
onhover="document.something.value=''whatever''".



Why not just use the title attribute? Simpler and accessible.
http://www.w3.org/TR/html4/struct/links.html#h-12.1.4


这篇关于javascript的可访问性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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