- Can a label be a heading?
- What can I use instead of labels in HTML?
- Why headings are important for screen readers?
Can a label be a heading?
Labels as page headings
To set the contents of a label as the page heading, you need to put the <label> tag inside the <h1> tag. You can either do this in HTML, or by using the Nunjucks macro and setting isPageHeading: true . You then need to apply classes to the <label> to make it look like a heading.
What can I use instead of labels in HTML?
An input with a type="submit" or type="button" does not need a label — the value attribute acts as the accessible label text instead. An input with type="hidden" is also fine without a label.
Why headings are important for screen readers?
Benefits of Headings
Making texts larger helps guide the eye around the page. Using headings and making them visually apparent is especially helpful for users with cognitive disabilities. If the underlying code for a pages headings is correct, screen reader users can also benefit from headings.