The golden rule of Customizable Select

Open original

Safari 27’s customizable select lets you fully style <select> controls without JavaScript, but you must include text or accessible labels for each option. Skipping text breaks keyboard navigation, screen readers, and fallbacks in unsupported browsers—icons or swatches must supplement, not replace, option text.

  • Safari 27's customizable select allows full CSS styling of dropdowns while keeping native keyboard/accessibility behavior, but only if every option retains real text or an aria-label.
  • Icon-only options (e.g., a hummingbird icon with no label) leave screen readers silent and sighted users guessing, since nothing conveys which option is selected or what it means.
  • If CSS fails or a browser lacks support, the control falls back to a default select—so text-less options degrade into a list of blank entries.
  • Best practice: wrap custom styles in @supports(appearance: base-select), design with plain text as the foundation, and add icons/swatches as supplements—visually hidden if needed—never as replacements for text.

Safari 27 will let you style native <select> controls completely—custom arrows, color swatches, icons and full CSS—without losing built-in keyboard and accessibility support. The catch: every <option> still needs real text (or an accessible attribute like aria-label). Skip that and you break usability, screen readers, and fallbacks in older browsers. Imagine a photo site with a category dropdown showing only icons—a building, a flower, a hummingbird. It looks sleek until you realize there’s no way to know which icon is selected, or what each one means. Add a hidden text label or aria-label and the menu becomes instantly clear. Screen readers announce “Wildlife” instead of silence, braille displays get actual words, and sighted users scanning the list get meaning at a glance. On browsers without support for customizable select, or when CSS fails to load, your enhanced control falls back to the default select. If your options lack text, that fallback is a list of blanks. The article recommends wrapping styles in an @supports(appearance: base-select) block, building your UI around plain text first, and layering icons or swatches on top without replacing any words. In short: never ditch text. Hide it visually if you must. Keep it tiny or off-screen. But make sure every option carries real content. That single rule prevents broken menus, preserves accessibility, and ensures a smooth upgrade path across all browsers.

Ask about this article