如何仅从屏幕阅读器隐藏任何元素,而不是普通用户的页面?
我知道这些片段,但我想隐藏屏幕重做的东西,但不是从视觉上的页面隐藏. Sscreen阅读器应该跳过隐藏的部分.
- /* Hide for both screenreaders and browsers
- css-discuss.incutio.com/wiki/Screenreader_Visibility */
- .hidden { display: none; visibility: hidden; }
- /* Hide only visually,but have it available for screenreaders
- www.webaim.org/techniques/css/invisiblecontent/ ; & j.mp/visuallyhidden ; */
- .visuallyhidden { position: absolute !important;
- clip: rect(1px 1px 1px 1px); /* IE6,IE7 */
- clip: rect(1px,1px,1px); }
- /* Hide visually and from screenreaders,but maintain layout */
- .invisible { visibility: hidden; }