Skip to content

Fix: Replace duplicate callout headings with ARIA-labeled sections #884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

reshma045
Copy link

Description

This PR addresses issue #871 by replacing repeated heading elements (<h5>Tip</h5>, <h5>Note</h5>, etc.) used in callout blocks with <section> elements that include accessible ARIA labels instead.

Changes Made

  • Modified src/components/callout/index.astro:
    • Replaced <h5> heading with <section role="region" aria-label="...">
    • Ensured the title is passed as an ARIA label instead of a heading element.
    • Removed heading tags to prevent unnecessary duplication in the document outline.

Before vs After

  • Before: Multiple <h5>Tip</h5> or <h5>Note</h5> headings were present, cluttering the document structure and affecting accessibility.
  • After: Replaced with <section aria-label="Tip">...</section> and similar, improving semantic clarity and screen reader navigation.

Screenshot

Before
3

After
4

Related Issue

Closes #871

@coseeian
Copy link
Collaborator

coseeian commented Jul 1, 2025

This PR looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Content] Duplicate heading text used for callout blocks
2 participants