instacart / Snacks

The Instacart Component Library
https://instacart.github.io/Snacks/
Apache License 2.0
81 stars 36 forks source link

a11y: removing conditional from aria-describedBy in MaskedTextField #486

Closed reecealanboyd closed 2 years ago

reecealanboyd commented 2 years ago

This fixes a missing aria-describedBy attribute on MaskedTextField.

It is missing because of the unnecessary conditional.

See in the screenshot that the id of the error text error_userphone-45994 is not in the aria-describedBy of the input

missing_aria-describedBy_attribute

codecov[bot] commented 2 years ago

Codecov Report

Merging #486 (86b3cd8) into master (e6161fc) will decrease coverage by 0.01%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #486      +/-   ##
==========================================
- Coverage   84.16%   84.15%   -0.02%     
==========================================
  Files          62       62              
  Lines        1572     1571       -1     
  Branches      362      361       -1     
==========================================
- Hits         1323     1322       -1     
  Misses        198      198              
  Partials       51       51