We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6eb783f commit 963ba4fCopy full SHA for 963ba4f
src/lib/components/ui/Accordion.svelte
@@ -152,6 +152,7 @@
152
<button
153
type="button"
154
aria-controls="{section.uniqueid}-content"
155
+ id="{section.uniqueid}-button"
156
class="govuk-accordion__section-button"
157
aria-expanded={isExpanded}
158
onclick={() => toggleSection(section.uniqueid)}
@@ -225,6 +226,10 @@
225
226
class="govuk-accordion__section-content"
227
aria-live={ariaLiveValue}
228
hidden={!isExpanded}
229
+ role={uniqueSections.length < 6 ? 'region' : ''}
230
+ aria-labelledby={uniqueSections.length < 6
231
+ ? section.uniqueid + '-button'
232
+ : ''}
233
>
234
{#if typeof section.content === 'string'}
235
<p class="govuk-body">{section.content}</p>
0 commit comments