The proposed control is created once, placed immediately before the summary content and outside every label. It keeps aria-expanded and aria-controls, keeps focus, and takes its name from the field item.
What to check
- Tab to “Edit summary for Body”. It is a
buttonoutside everylabel, immediately before the summary wrapper. - Press Enter or Space. Focus stays on the same button;
aria-expandedflips betweenfalseandtrue;aria-controlspoints at the summary wrapper. - The Summary textarea is named “Summary for Body”. The Body textarea stays “Body” and does not change name when the disclosure is used.
- The control is before the content it reveals, so a screen reader user meets it before the summary.
- The submitted field names are not changed by this demonstration; the real proposal keeps
field_body[0][summary].
Back to the overview, or compare with Before.