kentcdodds / advanced-react-patterns-v2

Created with CodeSandbox
https://codesandbox.io/s/github/kentcdodds/advanced-react-patterns-v2
1.51k stars 568 forks source link

Switch a11y tweaks #24

Closed giuseppeg closed 6 years ago

giuseppeg commented 6 years ago

During the workshop I noticed that you were using a combo of input + button in the Switch component to toggle state. This PR is a small refactoring to make it accessible to screen readers. In the original version I found the following issues:

✌️☮️

codecov[bot] commented 6 years ago

Codecov Report

Merging #24 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #24   +/-   ##
======================================
  Coverage    41.6%   41.6%           
======================================
  Files          21      21           
  Lines         411     411           
  Branches       62      62           
======================================
  Hits          171     171           
  Misses        201     201           
  Partials       39      39

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e3faeba...c740755. Read the comment docs.