- Success Criterion 1.3.1
- Conformance level A
CSS Display Property Accidentally Stripping an Element’s Role
1.3.1 — Info and Relationships
Scenario
Setting
A budget airline's flight search results
What’s wrong
display:contents (style that can strip an element's role) on semantic elements stripping their role in some browsers.
Example
A budget airline's flight search results is a good example: display:contents (style that can strip an element's role) on semantic elements stripping their role in some browsers.
Why it matters
Screen-reader, braille, and reading-tool users who depend on coded structure rather than visual layout. On a budget airline's flight search results specifically, they can't navigate the content by its real structure.
How to test
Inspect elements with display: contents in DevTools' Accessibility Tree: check whether the element's role/semantics survive — some browsers strip them.
How to fix
Avoid display:contents (style that can strip an element's role) on semantic elements, or re-supply the role explicitly.
Outcome
Fixed, a visitor to a budget airline's flight search results can move through the content with confidence.
Who is affected
Screen-reader, braille, and reading-tool users who depend on coded structure rather than visual layout.
Learn more
- Understanding Understanding document (opens in a new tab)
Related scenarios
- Text Styled to Look Like a Heading Instead of Coded as One
- Text Columns Faked With Spaces Instead of Real Table Markup
- Table Layout Faked With Spaces Instead of Real Table Code
- Clickable Div Acting as a Link Button With No Real Role
- Structural HTML Tags Used Purely for Visual Styling
- Layout-Only Table Wrongly Coded With Real Header Cells