HTML: The Inaccessible Parts

栏目: IT技术 · 发布时间: 4年前

内容简介:I’ve always abided in the idea that “HTML is accessible by default and then we come along and mess it up.” In a lot places this is very true and by just using a suitable HTML element instead of a genericBut that’s not always the case. There are some cases

I’ve always abided in the idea that “HTML is accessible by default and then we come along and mess it up.” In a lot places this is very true and by just using a suitable HTML element instead of a generic div or span we can have a big Accessibility impact.

But that’s not always the case. There are some cases where even using plain ol’ HTML causes accessibility problems. I get frustrated and want to quit web development whenever I read about these types of issues. Because if browsers can’t get this right, what hope is there for the rest of us. I’m trying to do the best I can, use the platform, but seems like there’s a dozen “gotchas” lurking in the shadows.

I’m going to start rounding up those HTML shortfalls in this here post as a little living document that I can personally reference every time I write some HTML.

<input type="number">
Gov.UK finds Number Inputs aren’t inclusive .

<input type="date">
Graham Armfield finds Date Inputs not ready for use .

<input type="search">
Adrian Roselli points out Search Inputs aren’t as useful as originally thought .

<select multiple>
Sarah Higley tests with actual users and finds Select Multiple has a 25.3% success rate .

<progress>
Scott O’Hara finds numerous errors with the Progress element .

<meter>
Scott O’Hara finds more numerous errors with the rare Meter element .

<dialog>
Scott O’Hara declares Dialog not ready for production .

<details><summary>
Adrian Roselli feels Details/Summary are only good in limited contexts (e.g. Details doesn’t work as an Accordion , which is what I would expect).

<video>
Scott Vinkle goes with a third-party player after seeing that the native HTML Video Player is a very inconsistent experience for screen readers .

<div onclick>
Technically this is JavaScript, but the screen reader JAWS announces “Clickable” when the element or one its ancestors have a click event handler . This is a bummer for trying to make tap areas bigger.

<div aria-label>
Paciello Group educates how aria-label , aria-labelledby , and aria-describedby only work on certain elements… and not <div> elements . It’s not very intuitive to me that aria-label would only work sometimes and it seems like something linters like axe should catch.

<a href><div>Block Links</div></a>
Adrian Roselli finds Block Links in a Card UI have usability issues .

aria-controls
The aria-controls attribute is a great way to establish a relationship between two elements and is in tons of tutorials… only one problem… Heydon Pickering points out aria-controls doesn’t do anything .

role="tablist"
After some user testing, Jeff Smith discovered the best way to make accessible tabs is to remove role="tablist" , role="tab" , role="tabpanel" from their tabs .

I’ll do my best to update this as the situation evolves glacially over the next 20 years.


以上所述就是小编给大家介绍的《HTML: The Inaccessible Parts》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Java程序设计

Java程序设计

宋中山 严千钧 等编 / 清华大学出版社 / 2005-8 / 27.00元

本书全面、系统地介绍了Java语言的基本概念、基本语法和编程方法。主要内容包括:Java语言概述、数据类型与运算符、流程控制语句、类与对象、继承与多态、异常处理、工具类和算法、Applet小应用程序、图形用户界面、输入和输出、Java多线程以及Java高级编程。每章后面附有习题,读者可参考使用。 本书内容丰富,结构合理,语言简洁,深入浅出,通俗易懂。基础知识与程序实例相结合,示例典型......一起来看看 《Java程序设计》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

随机密码生成器
随机密码生成器

多种字符组合密码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试