Thchere

Safari Technology Preview 242: Major CSS and HTML Enhancements

Published: 2026-05-04 18:50:52 | Category: Technology

Introduction

Safari Technology Preview Release 242 is now available for download on both macOS Tahoe and macOS Sequoia. This latest version brings a host of improvements and bug fixes, focusing on accessibility, CSS, forms, and HTML. If you already have Safari Technology Preview installed, you can update it via System Settings > General > Software Update. This release includes WebKit changes between revisions 310187@main and 310599@main.

Safari Technology Preview 242: Major CSS and HTML Enhancements
Source: webkit.org

Accessibility Improvements

VoiceOver and Interactive Elements

Developers will appreciate the fix for VoiceOver where it previously read text within images that had role="presentation". This issue has been resolved (bug 159304061). Additionally, macOS accessibility support for customizable <select> elements using the appearance: base-select property has been fixed (bug 173696010).

CSS Enhancements and Bug Fixes

New CSS Features

Two new CSS features have been added:

  • attr() function – Support for the attr() function from CSS Values Level 5 is now included (bug 173700363).
  • oblique-only value – The font-synthesis-style property now supports the oblique-only value as defined in CSS Fonts Level 4 (bug 173730766).

Resolved CSS Issues

Several CSS bugs have been addressed, improving layout and rendering reliability:

  • Dark mode in iframes: @media (prefers-color-scheme: dark) inside an iframe now correctly matches when the iframe’s color-scheme is set to dark (bug 142072593).
  • Logical axis for position-try-order: The property now interprets logical axis values using the containing block’s writing mode instead of the element’s own writing mode (bug 169501069).
  • Percent-height replaced elements: Fixed an issue where such elements computed stale preferred widths in shrink-to-fit containers (bug 171184282).
  • Table cell minimum width: The nowrap minimum width calculation quirk is no longer applied outside of quirks mode (bug 171410252).
  • Checkbox outlines: Misaligned checkbox outlines have been corrected (bug 172742551).
  • Anchor-positioned elements: Elements anchored to children of sticky-positioned boxes now stick correctly (bug 172884148).
  • Pseudo-element sorting: Pseudo-elements are now sorted correctly when sorting anchor elements by tree order (bug 173032203).
  • Ligatures and zero font-size: Ligatures no longer cause non-zero layout width for text with font-size: 0 (bug 173840866).
  • :in-range and :out-of-range pseudo-classes: These updates correctly fire when the readonly attribute changes (bug 173978657).
  • view-timeline-inset serialization: Fixed an issue where identical values were not coalesced during serialization (bug 174096313).

Form Handling Updates

Select Multiple Interaction

A bug in <select multiple> has been resolved. Previously, the onchange event did not always fire when the mouse button was released far outside the element. This now works reliably (bug 173882861).

HTML Changes and New Features

New closedby Attribute for Dialog

The <dialog> element now supports the closedby attribute, giving developers more control over dialog dismissal behavior (bug 173974767).

HTML Parser Fast Path Fixes

Three important fixes have been made to the HTML parser’s fast path:

  • Correct processing of escaped attribute values longer than one character (bug 173673581).
  • Accurate detection of nested <li> elements (bug 173983892).
  • The fast path now uses the adjusted current node for MathML and SVG integration point checks (bug 174096305).

Image Handling

Srcset Attribute Fix

An issue where inserting an image with a srcset attribute into a document could cause unexpected behavior has been fixed (details available in WebKit bug tracker). This ensures responsive images work more reliably in dynamic content scenarios.

Conclusion

Safari Technology Preview 242 continues the tradition of pushing web standards forward. With significant CSS and HTML enhancements, along with critical accessibility and form fixes, this release helps developers build more robust and inclusive web experiences. Update your copy today via System Settings to take advantage of these improvements.