yued-fe / lulu

跨端跨框架的原生 UI 组件库,即插即用

Home Page:https://l-ui.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

关于switch的实现

Seasonley opened this issue · comments

我看了几种不同的switch实现方式,lulu是用原生checkbox的,ant design是用button的。然后又看了a11y_styled_form_controlsinclusive-components.design的示例,感觉<button role="switch" aria-checked="true"></button>是最符合语义的。查了w3c 也没明确说最佳实践,你们是怎么考虑的?

No JS