

























@@ -446,8 +446,8 @@ <h5 id="p10">Other static elements with <code>aria-label</code>, <code>aria-labe
446446</table>
447447<p><code>aria-label</code> and <code>aria-labelledby</code> have similar behaviour in screen readers and the Accessibility API, but <code>aria-label</code> should be reserved for when there is no visible text on the page to reference or when keeping track of <code>id</code> values would be too difficult. <a href="http://davidmacd.com/blog/does-aria-label-override-static-text.html">Test sources</a></p>
448448<h4>Internet explorer notes on aria-labelledby, aria-label, and aria-describedby</h4>
449- p>In Internet Explorer, if you use <code>aria-labelledby</code> with multiple <code>id</code> references or <code>aria-describedby</code> with single or multiple <code>id</code> references, the referenced elements <strong>must be</strong> what Microsoft terms as <a href="http://msdn.microsoft.com/en-us/library/ie/gg701963%28v=vs.85%29.aspx#Accessible_HTML_Elements">accessible HTML elements</a>.</p>
450-<p>The following example of <code>aria-labelledby</code> with multiple references uses a <code>span</code> with a <code>tabindex=-1</code> added. Refer to <a href="http://msdn.microsoft.com/en-us/library/ie/gg701963%28v=vs.85%29.aspx#Making_Nonaccessible_Elements_Accessible">Making Non accessible Elements Accessible</a>.</p>
449+<p>In Internet Explorer, if you use <code>aria-labelledby</code> with multiple <code>id</code> references or <code>aria-describedby</code> with single or multiple <code>id</code> references, the referenced elements <strong>must be</strong> what Microsoft terms as <a href="http://msdn.microsoft.com/en-us/library/ie/gg701963%28v=vs.85%29.aspx#Accessible_HTML_Elements">accessible HTML elements</a>.</p>
450+<p>The following example of <code>aria-labelledby</code> with multiple references uses a <code>span</code> with a <code>tabindex=-1</code> added. Refer to <a href="http://msdn.microsoft.com/en-us/library/ie/gg701963%28v=vs.85%29.aspx#Making_Nonaccessible_Elements_Accessible">Making Non accessible Elements Accessible</a>.</p>
451451<code class="block"><label
452452<mark>id="l1"</mark>
453453 for="f3">label text</label><br>
@@ -508,7 +508,7 @@ <h3>The Effect of Accessible Name on Background Images</h3>
508508<h5>What If You Can't Avoid Using CSS Images or If You Want Alternate Text for "Non-important" Ambient Photos, Etc.? </h5>
509509<p>The CSS spec makes its discouragement of CSS informational background images a "SHOULD" not a "MUST" because there are times when visual design or existing code makes it difficult to change it to an HTML image without redesigning the front-end. Other times the author may want to provide alternate text for an ambient image that is <em><strong>not</strong></em> "important" to the understanding of the content but as a courtesy to screen reader users who prefer knowing what is in the image. Here is a detailed article on <a href="http://davidmacd.com/blog/what-is-pure-decoration-alt-text-in-wcag.html">ambient images vs pure decoration vs informational images.</a> </p>
510510<h5>When Providing Alternate Text for the CSS Image, There Are Number of Considerations </h5>
511-<p>If the <code><div></code> tag has any content inside it, then a <code>role="img"</code> and <code>aria-label</code> could obscure the inside content because of the <a href="https://www.w3.org/TR/html-aam-1.0/#img-element">accessible name calculation</a>, or the assistive technology might just ignore the <code>aria-label</code>.
511+<p>If the <code><div></code> tag has any content inside it, then a <code>role="img"</code> and <code>aria-label</code> could obscure the inside content because of the <a href="https://www.w3.org/TR/html-aam-1.0/#img-element">accessible name calculation</a>, or the assistive technology might just ignore the <code>aria-label</code>.
512512</p>
513513<p>So do not put the CSS background image inside a <code><div></code> that contains any content. It's best to use an empty <code><span></code> and an <code>aria-label</code> with <code>role="img"</code></p>
514514<p><strong>Do this:</strong></p>
@@ -539,7 +539,7 @@ <h4>What If the Author Has to Have a CSS Image on a <code><div></code> tha
539539<h3 tabindex="-1">Using ARIA role=application</h3>
540540<h4 id="not">How Does role="application" Affect a Screen Reader?</h4>
541541<p>On many popular screen readers today, most keystrokes are captured by the screen reader and not the web page when the user is in browse mode. This is necessary for efficient navigation of a page. As of this writing, when application mode is set, many screen readers stop intercepting keystrokes, and pass all keystrokes directly to the browser. Then the user won't be able to navigate the page as easily. For instance they won't be able to skip around the page by headings or read a paragraph of static text line-by-line. However, several screen readers do not behave differently when there is an application role set.</p>
542-<h4>So When Should I Use It, and When Not? </h4>
542+<h4>So When Should I Use It, and When Not?</h4>
543543<p>In determining when to use <code>role=application</code>, one should consider, among other things, the advantages of screen reader keyboard shortcuts weighed against the loss of those features. It generally should not be used, and if it is, usability testing with screen reader users should be conducted.</p>
544544<p>You <strong>do not</strong> use <code>role="application"</code> if a set of controls only contains these widgets, that are all part of standard HTML. This also applies if you mark them up and create an interaction model using WAI-ARIA roles instead of standard HTML widgets:</p>
545545<p><strong>NOTE:</strong> It's not recommended that authors develop custom text input widgets. It's almost always best to use the native inputs for these.</p>
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。