Skip to content

Commit eccc6cf

Browse files
authored
Merge pull request #884 from reshma045/fix-branch
Fix: Replace duplicate callout headings with ARIA-labeled sections
2 parents fe6cdb9 + 24ddb1b commit eccc6cf

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/components/Callout/index.astro

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ const currentLocale = getCurrentLocale(Astro.url.pathname);
1414
const t = await getUiTranslator(currentLocale);
1515
---
1616

17-
<div class={`callout ${props.title ? 'callout-note' : ''}`}>
18-
<h5>{t('calloutTitles', props.title || "Try this!")}</h5>
17+
<section
18+
class={`callout ${props.title ? 'callout-note' : ''}`}
19+
role="region"
20+
aria-label={String(t('calloutTitles', props.title || "Try this!"))}>
21+
<div class="callout-heading" style="font-weight: bold;">
22+
{t('calloutTitles', props.title || "Try this!")}
23+
</div>
1924
<slot />
20-
</div>
25+
</section>

0 commit comments

Comments
 (0)