File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,21 @@ const faqs = [
3939 {
4040 faqs .map ((faq , i ) => (
4141 <div class = " accordion cursor-pointer bg-[#1E1E1E] border border-[#37363C] rounded-3xl w-full" >
42- <div
42+ <button
43+ id = { ` faq-${i } ` }
4344 aria-expanded = " false"
45+ aria-controls = { ` faq-${i }-content ` }
4446 class = " accordion-trigger flex justify-between p-6"
4547 >
4648 <h2 class = " font-semibold" >{ faq .question } </h2 >
4749 <Icon name = " chevron" class = " chevron w-4 " />
48- </div >
49- <div class = " accordion-content" >
50+ </button >
51+ <div
52+ class = " accordion-content"
53+ role = " region"
54+ id = { ` faq-${i }-content ` }
55+ aria-labelledby = { ` faq-${i } ` }
56+ >
5057 <div >
5158 <p class = " text-sm p-6 pt-0 " >{ faq .answer } </p >
5259 </div >
@@ -70,7 +77,7 @@ const faqs = [
7077 .accordion-content[aria-hidden="false"] {
7178 grid-template-rows: 1fr;
7279 }
73- .accordion-trigger svg{
80+ .accordion-trigger svg {
7481 transition: transform 500ms ease-in-out;
7582 }
7683
You can’t perform that action at this time.
0 commit comments