我是否需要实施 WAI ARIA 以符合 WCAG 2.0 AA?
Do I need to implement WAI ARIA to comply with WCAG 2.0 AA?
我正在构建一个需要符合 WCAG 2.0 AA 级的站点。
我的问题是我实现了多少个 ARIA 角色?
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques
如 my answer on User Experience SE 中所述,WCAG 2.0 不需要使用 WAI-ARIA。
但是,在某些特定情况下(取决于您的限制条件)您只能通过使用 WAI-ARIA 来满足 WCAG 2.0 准则。但这通常仅适用于您特意使用 HTML5(default/implicit WAI-ARIA 已经附带)做一些不适合的情况,例如,使用 [=10 创建一个表单=] 而不是 form
.
If you are using proper semantic and structural HTML, probably none. For those cases where you have to use the wrong element (such as a broken library or framework), then you may have to but that is not the way to start.
As always, context is key and blanket statements do not always apply.
If it is helpful, there are three (five) "rules" of ARIA use (they are suggestions, but you should treat them as rules for best effect):
First rule of ARIA use: If you can use a native HTML element [HTML51] or attribute with the semantics and behaviour you require already built in, instead of re-purposing an element and adding an ARIA role, state or 属性 to make it accessible, then do so.
Second rule of ARIA use: Do not change native semantics, unless you really have to.
Third rule of ARIA use: All interactive ARIA controls must be usable with the keyboard.
Fourth rule of ARIA use: Do not use role="presentation"
or aria-hidden="true"
on a visible focusable element. Using either of these on a visible focusable element will result in some users focusing on 'nothing'.
Fifth rule of ARIA use: All interactive elements must have an accessible name. An interactive element only has an accessible name when its Accessibility API accessible name (or equivalent) 属性 has a value.
我正在构建一个需要符合 WCAG 2.0 AA 级的站点。
我的问题是我实现了多少个 ARIA 角色?
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques
如 my answer on User Experience SE 中所述,WCAG 2.0 不需要使用 WAI-ARIA。
但是,在某些特定情况下(取决于您的限制条件)您只能通过使用 WAI-ARIA 来满足 WCAG 2.0 准则。但这通常仅适用于您特意使用 HTML5(default/implicit WAI-ARIA 已经附带)做一些不适合的情况,例如,使用 [=10 创建一个表单=] 而不是 form
.
If you are using proper semantic and structural HTML, probably none. For those cases where you have to use the wrong element (such as a broken library or framework), then you may have to but that is not the way to start.
As always, context is key and blanket statements do not always apply.
If it is helpful, there are three (five) "rules" of ARIA use (they are suggestions, but you should treat them as rules for best effect):
First rule of ARIA use: If you can use a native HTML element [HTML51] or attribute with the semantics and behaviour you require already built in, instead of re-purposing an element and adding an ARIA role, state or 属性 to make it accessible, then do so.
Second rule of ARIA use: Do not change native semantics, unless you really have to.
Third rule of ARIA use: All interactive ARIA controls must be usable with the keyboard.
Fourth rule of ARIA use: Do not use
role="presentation"
oraria-hidden="true"
on a visible focusable element. Using either of these on a visible focusable element will result in some users focusing on 'nothing'.Fifth rule of ARIA use: All interactive elements must have an accessible name. An interactive element only has an accessible name when its Accessibility API accessible name (or equivalent) 属性 has a value.