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

Datepicker - label knyttet til div #2532

Open
dagfrode opened this issue Feb 10, 2025 · 0 comments
Open

Datepicker - label knyttet til div #2532

dagfrode opened this issue Feb 10, 2025 · 0 comments
Labels
🐛 bug Bugs, errors and stuff that's just plain wrong 👓 a11y Accessibility

Comments

@dagfrode
Copy link
Contributor

Beskrivelse av feilen

Datepicker komponenten knytter labelen i input group til en div som ikke er semantisk riktig

TestingLibraryElementError: Found a label with the text of: Dato velger, however the element associated with this label (<div />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <div />, you can use aria-label or aria-labelledby instead.

https://github.com/SpareBank1/designsystem/blob/develop/packages/ffe-datepicker-react/src/datepicker/DatepickerComp.tsx#L247-L258

Steg for å gjenprodusere
Stegene du må ta for å fremprovosere feilen

  1. Gå til '...'
  2. Klikk på '....'
  3. Rull ned til '....'
  4. Se feilen

Forventet oppførsel
En kort og konsis beskrivelse av hva du forventet skulle skje.

Skjermskudd
Hvis det er hensiktsmessig og mulig kan ofte et skjermskudd beskrive bedre og kortere enn ord.

Desktop (fyll ut feltene ):

  • Operativssystem: [feks Windows 3.11]
  • Nettleser [feks Internet Explorer 6]
  • Versjonsnummer [feks 42]

Mobil (fyll ut feltene):

  • Enhet: [feks Nokia 3210]
  • Operativssytem: [feks Android]
  • Nettleser [feks Chrome]
  • Versjonsnummer [feks 22]

Tilleggsinformasjon
Øvrig informasjon som kan være relevant.

@dagfrode dagfrode added 🐛 bug Bugs, errors and stuff that's just plain wrong 👓 a11y Accessibility labels Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Bugs, errors and stuff that's just plain wrong 👓 a11y Accessibility
Projects
None yet
Development

No branches or pull requests

1 participant