p5.js-website
p5.js-website copied to clipboard
Fix: Replace duplicate callout headings with ARIA-labeled sections
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.
- Replaced
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
After
Related Issue
Closes #871