Use aria-expanded on the button element. Set it to "true" when the content
panel is visible and "false" when the content is hidden. This is a crucial state indicator
for screen reader users.
Use the aria-controls attribute on the button, and set its value to match the
id of the related content panel. This establishes a programmatic relationship, allowing
assistive technologies to jump directly to the relevant content.
The element containing the button should typically have role="heading" with an
appropriate aria-level to define the structure. This ensures the accordion
section is recognized as a section header, making the page structure navigable for users.