Accessible accordion issues

hello. i am getting a ‘critical’ accessibility error with AXE with the accordion. The code adds the Role=“tab” to the a class=accordion title but because the LI is before it create an error. I can fix the LI by making it the role=tab but then that creates an error with the A href who needs a parent element because of the automatic add of Role=“tab”.

any idea how i can fix this. 100% Accessibility is necessary for our sites.

thank you