If you want to create a button from scratch, you must first create the universe
madcampos.dev原文 ↗
文章用从零实现 button 拆开浏览器原生控件背后的复杂度。一个按钮实际包含 keyboard activation、focus management、disabled state、ARIA semantics、pointer interaction 和辅助技术互操作。它把 accessibility 从抽象道德要求拉回工程现实:自制控件通常失败在没有复制原生控件多年的默认行为。
–浏览
评论 · Comments