design-system icon indicating copy to clipboard operation
design-system copied to clipboard

[component]: Language switch

Open gfellerph opened this issue 1 year ago • 1 comments

Create a standalone language switch component. The current implementation (https://github.com/swisspost/design-system/tree/main/packages/internet-header/src/components/post-language-switch) relies on a config file, the new component should be usable without that configuration.

Design

https://www.figma.com/design/JIT5AdGYqv6bDRpfBPV8XR/Foundations-%26-Components-Next-Level?node-id=2908-30439&t=saHtog1amMMrG60S-4

Requirements

  • Keep the current functionality intact
  • Arrow keys should be used to switch between languages
  • Pay attention to the accessibility features implemented (screen readers should not read "EN" but "English" in the correct language)
  • There are two ways the component can be displayed, as a dropdown and as a horizontal list
  • This component does not need to be tokenised for the time being

Reference

image image
### Tasks
- [ ] https://github.com/swisspost/design-system/issues/1242
- [ ] Create a `<post-language-switch>` component
- [ ] Add documentation
- [ ] e2e tests
- [ ] Visual regression tests
- [ ] Design review

gfellerph avatar Oct 03 '24 14:10 gfellerph