Accessibility is not a “React Problem”
Opened this issue · 1 comments
barretlee commented
核心几点:
- 使用 HTML5 Outline 工具检查 DOM 结构,看看是否合理
- 使用语义化的标签,而不是 DIVs 和 SPANs
- 使用
React.Fragment
包裹返回多值的 JSX,可以看看这里 - 使用 Styled Components 或者 emotion 来编写组件代替标签
- 可重用的组件通过 Props 入参来区分语义,参考这里