fix(ffe-form-react): Fikse div med tooltip inne i fieldset legend #2035
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #1614
Beskrivelse
I ButtonInputGroup, fjernet bruken av legend og erstattet det med role.
Motivasjon og kontekst
For å unngå UU-feilen at div (Tooltippen) ikke kan være inne i legend.
Et forslag var også å flytte tooltippen ut av . Det skapte to ulike problemer: 1) styling av legend + tooltip førte til at man måtte wrappe i en div, som gir feil i UU fordi må være direkte under
ELLER ble veldig komplisert styling (jeg fikk det ikke til i alle fall, uten en div wrapper) og 2) Tooltippen oppfører seg da ikke som en del av legend/beskrivelsen, som også blir feil.Testing
Bekreftet med @SindreSafvenbom at det er en ok måte å løse det på og har testet med skjermleser. Har sjekket at koden nå passerer i https://validator.w3.org/
Legg gjerne ekstra merke til om commit-navnet er riktig, må bruke litt tid på å bli vandt med de