Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility is not a “React Problem” #3

Open
barretlee opened this issue Mar 12, 2019 · 1 comment
Open

Accessibility is not a “React Problem” #3

barretlee opened this issue Mar 12, 2019 · 1 comment
Labels
Web Tech Web 相关技术

Comments

@barretlee
Copy link
Owner

https://www.netlify.com/blog/2019/02/25/accessibility-is-not-a-react-problem/

@barretlee
Copy link
Owner Author

barretlee commented Mar 12, 2019

核心几点:

  • 使用 HTML5 Outline 工具检查 DOM 结构,看看是否合理
  • 使用语义化的标签,而不是 DIVs 和 SPANs
  • 使用 React.Fragment 包裹返回多值的 JSX,可以看看这里
  • 使用 Styled Components 或者 emotion 来编写组件代替标签
  • 可重用的组件通过 Props 入参来区分语义,参考这里

@barretlee barretlee reopened this Mar 16, 2019
@barretlee barretlee added the Web Tech Web 相关技术 label Mar 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Web Tech Web 相关技术
Projects
None yet
Development

No branches or pull requests

1 participant