<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/display-contents-considered-harmful-fvdoay0o2" -->

---
title: display: contents considered harmful | daily.dev
description: An argument against using the CSS display: contents declaration due to its long history of accessibility regressions. The declaration strips semantic qualities...
canonical: https://daily.dev/posts/display-contents-considered-harmful-fvdoay0o2
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: display: contents considered harmful | daily.dev
og:description: An argument against using the CSS display: contents declaration due to its long history of accessibility regressions. The declaration strips semantic qualities...
og:url: https://daily.dev/posts/display-contents-considered-harmful-fvdoay0o2
og:image: https://api.daily.dev/og/posts/FVdoay0O2.png
og:image:alt: display: contents considered harmful
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# display: contents considered harmful

**[Eric Bailey](https://daily.dev/sources/ericwbailey)** · 6 min read · 0 upvotes · 0 comments

## Summary

An argument against using the CSS display: contents declaration due to its long history of accessibility regressions. The declaration strips semantic qualities from elements (buttons, tables, lists no longer announced properly by assistive technology) when applied, and despite fixes being made by browser vendors, the behavior has regressed and re-broken repeatedly—documented across sixteen separate instances by accessibility researcher Adrian Roselli. Even Safari 17's September 2023 claim of fixing remaining issues left buttons and headings still broken. The piece concludes that display: contents cannot be trusted and should be avoided entirely, since there is no reliable way to test for future regressions the way tools like caniuse or Baseline allow for other CSS features.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://ericwbailey.website/published/display-contents-considered-harmful>

## Questions this post answers

### Does CSS display: contents cause accessibility problems with screen readers?

Yes, applying display: contents to an element can strip away its semantic role, preventing buttons from being announced as buttons, tables from being navigated as tables, and lists from being announced as lists by assistive technology. Browsers have repeatedly fixed and then regressed this behavior, with one tracker documenting sixteen separate regressions over time, making the property unreliable for accessible interfaces.

_Developers weighing CSS changes against accessibility risk track cases like this display: contents saga on daily.dev._

### Did Safari 17 fix the display: contents accessibility bugs?

Not completely. Safari 17, released September 18, 2023, claimed to have fixed its remaining accessibility issues with display: contents, but buttons and headings were still reported as broken afterward, meaning the declaration's behavior with assistive technology remained unreliable even after the update.

_Anyone deciding whether to rely on display: contents can follow browser accessibility fixes like this on daily.dev._

## Similar posts on daily.dev

- [Text-based web browsers](https://daily.dev/posts/text-based-web-browsers-nxau4hprz) · Hacker News · 65 upvotes · 5 comments
- [Chris’ Corner: A11Y](https://daily.dev/posts/chris-corner-a11y-uqdhzm4a9) · CodePen · 0 upvotes · 0 comments
- [Lost, forgotten, and unfamiliar HTML](https://daily.dev/posts/lost-forgotten-and-unfamiliar-html-gzqwgcxgb) · thoughbot · 75 upvotes · 3 comments
- [What Is CSS Containment and How Can I Use It? – CSS Wizardry](https://daily.dev/posts/what-is-css-containment-and-how-can-i-use-it-css-wizardry-id9g1po11) · CSS Wizardry · 7 upvotes · 2 comments
- [CSS Features That Are Safe to Ship Without a Fallback](https://daily.dev/posts/css-features-that-are-safe-to-ship-without-a-fallback-4qejdvj37) · Medium · 1 upvotes · 0 comments

---

Tags: [#css](https://daily.dev/tags/css), [#accessibility](https://daily.dev/tags/accessibility)

[View this post on daily.dev](https://daily.dev/posts/display-contents-considered-harmful-fvdoay0o2)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"display: contents considered harmful","url":"https://daily.dev/posts/display-contents-considered-harmful-fvdoay0o2","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/display-contents-considered-harmful-fvdoay0o2"},"datePublished":"2026-09-20T07:44:20.208Z","dateModified":"2026-09-20T07:47:55.116Z","description":"An argument against using the CSS display: contents declaration due to its long history of accessibility regressions. The declaration strips semantic qualities...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/cb10f178805900873b3f95b4a150fe76?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/cb10f178805900873b3f95b4a150fe76?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Eric Bailey","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Eric Bailey","logo":"https://media.daily.dev/image/upload/s--r1vwe6z1--/f_auto,q_auto/v1789890198/logos/ericwbailey?_a=BAMAMicg0","url":"https://daily.dev/sources/ericwbailey"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/display-contents-considered-harmful-fvdoay0o2","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"css,accessibility","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Eric Bailey","item":"https://daily.dev/sources/ericwbailey"},{"@type":"ListItem","position":3,"name":"display: contents considered harmful"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/display-contents-considered-harmful-fvdoay0o2#faq","mainEntity":[{"@type":"Question","name":"Does CSS display: contents cause accessibility problems with screen readers?","acceptedAnswer":{"@type":"Answer","text":"Yes, applying display: contents to an element can strip away its semantic role, preventing buttons from being announced as buttons, tables from being navigated as tables, and lists from being announced as lists by assistive technology. Browsers have repeatedly fixed and then regressed this behavior, with one tracker documenting sixteen separate regressions over time, making the property unreliable for accessible interfaces. Developers weighing CSS changes against accessibility risk track cases like this display: contents saga on daily.dev."}},{"@type":"Question","name":"Did Safari 17 fix the display: contents accessibility bugs?","acceptedAnswer":{"@type":"Answer","text":"Not completely. Safari 17, released September 18, 2023, claimed to have fixed its remaining accessibility issues with display: contents, but buttons and headings were still reported as broken afterward, meaning the declaration's behavior with assistive technology remained unreliable even after the update. Anyone deciding whether to rely on display: contents can follow browser accessibility fixes like this on daily.dev."}}]}
```

