-
Notifications
You must be signed in to change notification settings - Fork 0
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
Accordion description #910
base: main
Are you sure you want to change the base?
Conversation
|
✅ Deploy Preview for obos-grunnmuren ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Støtte Description i Accordion
Utkast på omskriving av Accordion for å:
<Description/>
aria-role
ogaria-describedby
inne iContent
, dette kan være aktuelt hvis man f.eks. vil putte en<CheckboxGroup/>
inne i<Content/>
Jeg lurer på om vi egentlig skulle hatt en komponent til, som er litt mer bare-bones. Minimalt med styling og fast semantikk, som da følger patternet til
https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/
. Da kunne vi kalt den for<Disclousure/>
, og gjenbrukt deler av den i implementasjonen til<Accordion/>
.Jeg føler i hvert fall litt at implementasjonen til
<Accordion/>
begynner å skli litt ut her. Og vi har allerede konkludert med at vi har behov for noe som ligner mer på disclosure patternet (f.eks. "Les mer"). Da kunne vi fjernetnoContentBorder
ognoPanelContentAria
som er lagt til her. Så kunne man brukt<Disclousure/>
for å få til akkurat det samme.Da ser jeg for meg at en
<Disclousure/>
kunne fungert slik:Og blitt rendret slik (litt forenklet):
I tillegg har lagt inn en id-referanse (
contentId
) som manglet på Content her. Det burde kanskje fikses uavhengig av denne PR-en egentlig. Men det kommer litt an på hva vi bestemmer oss for å gjøre