p5.js-website icon indicating copy to clipboard operation
p5.js-website copied to clipboard

Fix: Replace duplicate callout headings with ARIA-labeled sections

Open reshma045 opened this issue 5 months ago • 0 comments

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

reshma045 avatar Jun 28 '25 08:06 reshma045