问题标签 [wai-aria]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
jquery - 我对 jquery、aria-disabled 和 :disabled 选择器缺少什么?
使用诸如
我希望这与 ':disabled' CSS 选择器匹配,但事实并非如此。该按钮显然被禁用,但它具有以下属性:
我收集到这个aria-disabled
东西是一个不相关的 IE 供应商前缀,但为什么它没有常规的旧“禁用”?我在这里做错了吗?我从我们使用 jQuery UI 的类中收集信息,对此我知之甚少(我正在寻找其他人代码中的错误)。
html - Button Elements as Tabs
Is it okay to use <button>
elements (rather than anchor links) as tabs?
Here's my use-case...
I'm marking up a set of tabs using button elements, and when I try to assign them ARIA roles, I get this validation error:
It appears that the ARIA role tab
is not allowed on <button>
elements. Is there a reason you shouldn't use <button>
for tabs?
In case it's helpful, here's the relevant markup:
javascript - aria-owns, aria-invalid, aria-expanded的解释和例子
我正在查看一些代码,其中一个标签具有属性aria-owns
, 和aria-expanded
. 我用谷歌搜索了它们,但没有找到足够的细节来完全理解它们的作用。
有人可以解释这些特定属性的用途吗?我对 aria 属性的作用有一个大致的了解(我使用过aria-labelledby
)?
javascript - 将 aria-labelledby 添加到表中的嵌套元素的解决方法
我有一个包含嵌套表单、下拉列表等的表格,我试图通过让屏幕阅读器读取列中每个元素的列标题来访问它。目前,我正在尝试使用标头的 id 添加 aria-labelledby,但这有时会因为元素是动态创建的而变得有点乏味。有一个更好的方法吗?
javascript - 将 aria 属性添加到 dojo 小部件
我正在做一些可访问性工作,我目前一直在添加 aria-* 属性,就像我添加任何其他属性一样。是否有一种特殊的方法可以将 aria-* 属性添加到 dojo 小部件,或者最好的做法是像添加任何其他属性一样添加它们?
accessibility - 使用 wai-aria 时 alt 标签有多重要
如果图像标签必须在 a 标签内,并且具有兄弟跨度,则显示的内容与 a/img 元素的 alt/title 标签中的内容相同。
无需重复数据
如何使用 aria-labelledby 属性获得可访问性。
我希望这个问题能帮助我了解 aria 特定属性和常规 html 属性如何在可访问性中发挥作用。Alt 标签与 aria-labelledby。
html - Accessibility of supplementary content
I'm trying to add "invisible" supplementary content to HTML elements and I would like to avoid creating new elements in the DOM. I would also like to maintain accessibility as much as I can (i.e. read out by screen readers VoiceOver and JAWS). How would I do this?
Note: In my context, supplementary content mostly consists of help text, but there are some instances where additional information will appear. For sighted users, this content might appear in a non-modal alert box or tooltip, for instance.
I can use the
title
attribute, but there seems to be quite a few problems associated with this. Also I'd like to be able to customize the appearance of the text (whether it be a custom tooltip or widget) andtitle
will produce the browser's default tooltip.I can put the content into the
aria-label
attribute, but this seems to be more appropriate for alternative content rather than supplementary content.The most accessible method seems to be
aria-describedby
, however that would require the content to be put into a separate DOM element with an ID along with ARIA roletooltip
, which isn't really feasible at this point in time.Finally there's the HTML5
data-*
attributes, which are there for content to be used in scripts and such, but there's nothing about the accessibility of that.
An attribute is preferable because I can also access the contents using the CSS attr()
method if I do not use JavaScript. Then again, do screen readers read generated content?
javascript - JS wai-aria 和 jQuery 加载的动态内容
我正在编写一个使用twitter bootstrap
and的 Web 应用程序aria
。我有一个带有排序选项的表,它看起来:. 我的内容正在动态加载到#content div
函数jQuery.html()
中。当我点击F5
一切正常时,但是在我通过 jQuery 将内容加载到包含这些表的 div 之后,出现了问题。表格失去了他们的搜索选项和分页栏.. 像这样:。
很少有功能也停止工作。我应该如何将动态内容加载到我的#content div
?
我当前的代码:
是否有任何方法 aria 在动态更改 div 的内容后应该调用?
html - 你能用一个
我正在使用 HTML5 和 WAI-ARIA 改进我的 HTML 的可访问性。
可以进行以下设置吗?
我不确定的是我是否应该将<aside>
元素放在<section>
容器role="main"
之外。这有关系吗?