On April 23, Apple released Safari Technology Preview 242 for macOS Tahoe and macOS Sequoia. The release adds CSS attr() from CSS Values Level 5, the getAllRecords() API on IndexedDB, the closedby attribute on <dialog>, and support for RTCRtpReceiver.jitterBufferTarget in WebRTC. No single addition is a headline shift, but together they close concrete gaps that anyone building web apps and PWAs on Safari will recognise.
CSS attr() with typed values
The attr() function has existed in CSS since level 2, but for years it only supported string values and only worked inside the content property. CSS Values Level 5 extends it: you can now declare an expected type (number, color, length, angle, and so on) and use the result in any CSS property.
.badge {
width: attr(data-size px);
background-color: attr(data-color color);
}
Until now, achieving this required CSS custom properties set via JavaScript or inline style="" attributes. The data can now live in the HTML and CSS consumes it directly. For components that drive their appearance from data-* attributes, this removes a real layer of scripting overhead.
IndexedDB.getAllRecords() and IDBGetAllOptions
getAllRecords() returns, in a single call, an array of objects containing both the key and value for every record in an object store. Previously you could fetch only keys (getAllKeys()) or only values (getAll()), or iterate through both with a cursor. IDBGetAllOptions adds configuration: a key range, a direction (ascending or descending), and a count limit. For anyone using IndexedDB as a structured cache or local list store, this API meaningfully reduces boilerplate and improves throughput compared to cursor-based iteration.
closedby on dialog
The closedby attribute on <dialog> controls how the dialog can be dismissed:
closedby="any"(default): closeable by pressing Escape or clicking outside the element.closedby="closerequest": closeable only via Escape or the CloseWatcher API.closedby="none": closeable only programmatically via.close().
The none value is useful for flows that require an explicit user decision — unsaved-data confirmations, mandatory wizard steps, alerts that must trigger an action. Until now, locking a dialog open required manually intercepting keydown for Escape and preventing the default. closedby="none" makes this declarative and better aligned with native browser accessibility semantics, instead of being a manual override.
RTCRtpReceiver.jitterBufferTarget
RTCRtpReceiver.jitterBufferTarget lets a web app hint the target delay for the jitter buffer on incoming RTP streams. Lowering it reduces latency at the cost of sensitivity to network variation; raising it improves robustness. It is a niche addition, but concrete for anyone building videoconferencing or real-time audio/video tools on Safari.
Other changes
- Secure cookies on loopback: cookies with the
Secureattribute can now be set when the page is served onlocalhostor other loopback hosts. This affects local development: some authentication libraries require secure cookies even during development and previously did not work on Safari without a local certificate. - SVG lang and xml:lang: correct support for language attributes on SVG elements.
- Accessibility for appearance: base-select: improved macOS VoiceOver support for customised
<select>elements usingappearance: base-select, which had been introduced in earlier releases but had outstanding issues.
Safari Technology Preview 242 is available through System Settings > General > Software Update on macOS Tahoe and Sequoia. The APIs introduced here are not yet in stable Safari; their path to release depends on further internal review cycles.
