Daily Accessibility ReviewCarousel Component Uses <h1> for Slide Titles, Breaking Heading Hierarchy #17839
Unanswered
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
In
shell/components/Carousel.vue, each slide title is rendered using an<h1>element (line 205). Since carousels are embedded inside pages that already have their own heading hierarchy, this results in unexpected<h1>elements appearing mid-page (e.g., on the Apps/Charts page), which disrupts the logical document outline for screen reader users.WCAG 2.2 Reference
<h1>inside a sub-component embedded in a page creates an incorrect outline.Affected File
shell/components/Carousel.vue(line 205):This
<h1>tag is rendered for each carousel slide. On the Apps/Charts index page (shell/pages/c/_cluster/apps/charts/index.vue), the page already has its own<h1>, so the carousel introduces additional<h1>elements inappropriately.Recommended Fix
Change the slide title heading to an appropriate sub-level heading or a styled element that does not affect the document outline. A
<h3>or<h4>(depending on surrounding headings), or a<p>with bold styling, would be more appropriate:Consider making the heading level configurable via a prop so that consuming pages can set an appropriate level.
Beta Was this translation helpful? Give feedback.
All reactions