Skip to content
ClearedGet the next issue
Issue 04

Cleared 04 · April 2026 · Cleared to use. Cleared to delete. Five minutes.

Delete your role="search" wrapper

Published 4 May 2026 · covers April 2026 · 1 Cleared·1 Hold

A thin month, and a backwards one. Baseline’s rhythm is usually set by Safari, the browser that ships least often. April’s two arrivals were both waiting on the Chromium side: Firefox and Safari had shipped contrast-color() and Math.sumPrecise() months earlier, and Chrome 147 landed on 7 April with Edge two days behind. Four more features finished their 30 months of support. One of them is a deletion.

01Cleared

<search>

Safe everywhere as of 13 April 2026

An HTML element for the region that holds your search box. It maps to the same search landmark the role attribute gave you, so screen reader users can jump straight to it without you writing any ARIA.

Delete: the role="search" attribute, and usually the <div> it sits on.

HTML · before after
<!-- a div doing an element's job -->
<div role="search">
  <form action="/search"></form>
</div>

<search>
  <form action="/search"></form>
</search>

One styling seam. Browsers that know the tag give it display: block in the user agent stylesheet. A browser too old to know it gives it nothing, and the initial value of display is inline. If old browsers matter to you, declare search { display: block } yourself: one line, inert wherever the browser already does it. Beyond that, failure is graceful. The contents render everywhere, and an old browser loses the landmark, not the page.

A note on the numbers: the summary scoreboard currently shows Safari at zero on this feature. The tests underneath disagree. In Safari’s current stable run, every test with the element’s name in its path passes, and the role-mapping suite passes whole. The zero is the scoreboard’s, not Safari’s.

02Hold

contrast-color()

Not yet

Hand it a background color and it returns white or black, whichever contrasts more. New this month, 10 April 2026. The deletion it promises is every hand-maintained pair of background and text custom properties.

CSS
.badge {
  background: var(--accent);
  color: contrast-color(var(--accent));
}

/* Which of white or black wins on a mid-tone
   background is the browser's call, not yours. */

The label is running ahead of the paperwork. The function’s spec is an editor’s draft that still carries the banner “This spec is not yet ready for implementation”, and in the only form browsers ship, with no target contrast stated, the spec leaves the choice of contrast algorithm to the browser. Two engines can legitimately disagree about which of white or black a mid-tone background gets. The tests say the seams are real: Firefox’s current stable run fails the case where contrast-color() feeds a container style query, Safari’s fails to repaint a gradient whose color stop uses contrast-color(currentColor), and each of the four engines drops one of the seventeen valid-syntax parses. One more thing the name does not say: it maximizes contrast, it guarantees none. Against a mid-gray background the winner clears no bar, it just loses less. For now, picking the text color yourself is the only way to know what it will be.

That was April: one attribute to delete, and one new function whose own spec asks you to wait. The other four transitions gave you nothing to do, which is the honest truth about most features in most months.

Deleted something because of this? Got a correction? . I read every one.

Subscribe