The golden rule of Customizable Select
Customizable select, arriving in Safari 27, lets developers fully style `<select>` elements with custom arrows, icons and swatches while keeping native keyboard navigation and accessibility semantics. The one essential rule is to always give each `<option>` text content or an accessible text attribute. Icon-only options are harder for everyone to scan, unusable with screen readers and braille displays, and render as empty options in browsers without support or when CSS fails to load. Use visually hidden text or `alt` attributes where needed, mark decorative images with `alt=""`, and wrap enhancements in `@supports (appearance: base-select)` so plain text stays the baseline.
Related posts
- WebKit Features for Safari 27.2
WebKit mediumAdeptSafari 27.2 refines Customizable Select with a new `::field-content` pseudo-element for styling the displayed selected option without `<selectedcontent>`, adjusts `appearance: base-select` UA styles (flex-based button spacing, inherited `text-overflow`, simpler `::picker-icon`), and uses `safe` alignment so large pickers stay within the viewport. Grid Lanes renames `flow-tolerance` to `fit-tolerance` (old name kept as a deprecated alias); the property sets how close column heights must be to count as tied, and raising it well above the 1em default keeps item order steadier for keyboard users. The release also ships 20 bug fixes spanning accessibility, media/WebCodecs, cookies under CNAME, WebGPU indirect draws, and WebRTC.
- An HTML Switch Control
WebKit mediumAdeptSafari 17.4 adds a native HTML switch control via `<input type=checkbox switch>`, which falls back to a plain checkbox in browsers without support. It mirrors the checkbox API (`:indeterminate` never matches), uses the ARIA switch role with On/Off announcements and OS accessibility indicators, and supports vertical writing modes. It also honors `accent-color` on the track, and `appearance: none` resets all properties to initial values for full custom styling. Use a switch for on/off settings and a checkbox for selection. Experimental `::thumb` and `::track` pseudo-elements sit behind a feature flag pending standardization.
- Bringing Back Horizontal Rules in Select Elements
WebKit mediumAdeptSafari 17.0 on macOS again renders `<hr>` elements placed between `<option>`s in a `<select>` as horizontal separator lines. Originally added to WebKit in 2006, the feature was silently lost for a decade when WebKit adopted its HTML5-based parser, and was restored by changing the HTML Standard's parsing rules so it is now standardized and covered by cross-browser tests. Caveats: separators are visual only and not announced by assistive technologies such as VoiceOver, `<hr>` is only supported as a direct child of `<select>` (not `<optgroup>`), and with `size` > 1 they render as blank space.
- Implementing Vertical Form Controls
WebKit mediumAdeptSafari 17.4 supports vertical writing modes (`writing-mode: vertical-rl` / `vertical-lr`) on button, textarea, progress, meter, input and select elements, part of the Interop 2023 effort for CJK and Mongolian text. Inside WebKit, the user-agent stylesheet moved from physical to logical properties, custom layout code was fixed to compute logical widths, and baseline alignment now uses the central baseline in vertical modes. On macOS, which has no native vertical controls, some system-drawn controls like progress are rotated, while select uses custom fallback painting because its shadows prevent rotation. Custom-painted controls now use logical coordinates, glyph-like checkboxes and radios needed no changes, and popup UIs such as select menus and color pickers remain horizontal.
- News from WWDC26: WebKit in Safari 27 beta
WebKit mediumAdeptSafari 27 beta ships 58 new features, 525 fixes and 4 deprecations, with most of the work going into correctness, edge cases, cross-feature interactions and alignment with web standards and other browsers. Headline features include customizable <select> via appearance: base-select with ::picker-icon, ::checkmark and <selectedcontent>, transform-aware anchor positioning, scroll anchoring, WebAssembly JSPI, the :heading pseudo-class, revert-rule, the stretch sizing keyword and subpixel inline layout. Anchor positioning also changes: position-anchor now defaults to normal, and anchors-valid/anchors-visible are renamed to anchor-valid/anchor-visible. Long lists of fixes cover CSS layout, :has() invalidation performance, SVG 2 alignment, tables and form controls.