== Why is this an issue? Header elements are represented by the tags ``++

++`` through ``++

++``, with ``++

++`` being the highest level and ``++

++`` being the lowest. These elements are used to structure the content of the page and create a hierarchical outline that can be followed by users and search engines alike. In the context of accessibility, header elements play a crucial role. They provide a way for users, especially those using assistive technologies like screen readers, to navigate through the content of a webpage. By reading out the headers, screen readers can give users an overview of the content and allow them to jump to the section they're interested in. If a header element is empty, it can lead to confusion as it doesn't provide any information about the content that follows. This can make navigation difficult for users relying on screen readers, resulting in a poor user experience and making the website less accessible for people with visual impairments. Therefore, to ensure your website is accessible to all users, it's important to always include meaningful content in your header elements. == How to fix it Do not leave empty your header elements. === Code examples ==== Noncompliant code example [source,javascript,diff-id=1,diff-type=noncompliant] ---- function JavaScript101() { return ( <>

JavaScript Programming Guide

An introduction to JavaScript programming and its applications.

JavaScript Basics

Understanding the basic concepts in JavaScript programming.

Variables

Explanation of what variables are and how to declare them in JavaScript.

Data Types

// Noncompliant

Overview of the different data types in JavaScript.

// Noncompliant

Understanding how to declare and use functions in JavaScript.

); } ---- ==== Compliant solution [source,javascript,diff-id=1,diff-type=compliant] ---- function JavaScript101() { return ( <>

JavaScript Programming Guide

An introduction to JavaScript programming and its applications.

JavaScript Basics

Understanding the basic concepts in JavaScript programming.

Variables

Explanation of what variables are and how to declare them in JavaScript.

Data Types

Overview of the different data types in JavaScript.

Functions

Understanding how to declare and use functions in JavaScript.

); } ---- == Resources === Documentation * MDN web docs - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements[Heading elements] * MDN web docs - https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-hidden[aria-hidden] * WCAG - https://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-descriptive.html[Headings and Labels]