#108824File upload - Heading structure inconsistent
Description
Description
In the “Upload file” area, a heading is implemented inside a switch/button. The switch/button contains a level 3 heading. Using a heading element inside an interactive control (switch/button) is semantically incorrect and may lead to confusing output for assistive technologies.
Reproduction steps
- Open the TYPO3 backend and navigate to the module/record containing the “Upload file” section.
- Use the browser DevTools to inspect the HTML structure of the switch/button in the upload area.
- Check whether a heading element (
–
, specifically
) is nested inside the switch/button.
- Confirm that the button label is implemented as a level 3 heading.
Impact
- Screen reader users may perceive the heading inside the button as a structural heading, although it is actually just the label of an interactive control.
- The semantic document structure is weakened, because headings should describe sections of content and not be part of a control itself.
- This can cause confusing or redundant announcements in screen readers.
Target group
- Screen reader users
- Users who rely strongly on clear semantic structure (e.g. cognitive impairments)
- TYPO3 backend editors using assistive technologies
Severity
Medium (semantic issue affecting understandability of structure for assistive technologies, but limited to a specific area/control).
Frequency
Occurs every time the affected “Upload file” area is opened (100%).
Definition of Done
- There is no heading inside a switch/button in the affected “Upload file” area anymore.
- The former heading used as button label is implemented as a regular label.
- Screen readers announce the control with a clear role and accessible name, without treating it as a heading.
- The page’s heading outline is not distorted by a heading nested in a button.
- Manual tests with at least one screen reader (e.g. NVDA/JAWS/VoiceOver) have been performed.
Recommended solution
Remove the current h3 element and replace it with an element marked up as label.
References / WCAG 2.2 Reference
- WCAG 2.2 – 1.3.1 Info and Relationships: Headings are meant for structuring content; button semantics must not distort this structure.
- WCAG 2.2 – 2.4.6 Headings and Labels: Labels should clearly describe the purpose of controls; headings and labels serve different roles.
- WCAG 2.2 – 4.1.2 Name, Role, Value: Interactive elements like buttons must have a clear role and accessible name; mixing heading and button semantics can confuse assistive technologies.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[BUGFIX] File upload - Heading structure inconsistent Resolves: #108824 Releases: main