trussworks / react-uswds

USWDS 3.0 components built in React
https://trussworks.github.io/react-uswds/
Apache License 2.0
182 stars 81 forks source link

fix: Duplicate classes and invalid aria props on LanguageSelector #2893

Open sawyerh opened 5 months ago

sawyerh commented 5 months ago

Summary

This fixes a few issues with the LanguageSelector implementation:

  1. The usa-language-container class was being applied to both the parent div and the inner button, which causes layout issues due to the button receiving unexpected margins and relative positioning
  2. 2809

An assumption I am making in this PR is that the intent of the className prop is to apply custom styling to the button, which is how it's demonstrated in Storybook.

How To Test

Storybook

Screenshots (optional)

CleanShot 2024-04-18 at 15 08 34@2x