<!--
{
  "availability" : [
    "iOS: 18.4.0 -",
    "iPadOS: 18.4.0 -",
    "macCatalyst: 18.4.0 -",
    "macOS: 15.4.0 -",
    "visionOS: 2.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKWebExtension/Action/hasUnreadBadgeText",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKWebExtensionAction(py)hasUnreadBadgeText"
  },
  "title" : "hasUnreadBadgeText"
}
-->

# hasUnreadBadgeText

A Boolean value indicating whether the badge text is unread.

```
var hasUnreadBadgeText: Bool { get set }
```

## Discussion

This property is automatically set to `YES` when [`badgeText`](/documentation/WebKit/WKWebExtension/Action/badgeText) changes and is not empty. If [`badgeText`](/documentation/WebKit/WKWebExtension/Action/badgeText) becomes empty or the popup associated with the action is presented, this property is automatically set to `NO`. Additionally, it should be set to `NO` by the app when the badge has been presented to the user. This property is useful for higher-level notification badges when extensions might be hidden behind an action sheet.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)