标签: HTML
6 个内容
笔记(3)
HTML标准元素自带键盘可访问性,自定义组件需使用`tabindex`属性确保可访问。`tabindex="0"`将元素加入Tab顺序,`-1`移除。避免使用`tabindex > 0`,因其破坏DOM顺序,影响屏幕阅读器体验。Lighthouse可检测`tabindex > 0`的问题。
Elliot Yang·
108 浏览
动态(3)
E
Elliot Yang
公开
Html Element area, map
浏览:179点赞:0
E
Elliot Yang
公开
How to use React label element?
If you try to render a<label> element bound to a text input using the standard for attribute, then it produces HTML missing that attribute and prints a warning to the console.
1<label for={'user'}>{'User'}</label>
2<input type={'text'} id={'user'} />for is a reserved keyword in JavaScript, use htmlFor instead.
1<label htmlFor={'user'}>{'User'}</label>
2<input type={'text'} id={'user'} />浏览:244点赞:0