The Focus-Indicated Pseudo-class :focus-visible
The :focus-visible pseudo-class lets authors style focus indicators only when the browser's own heuristics would draw one, such as during keyboard navigation or in text inputs, but not on a mouse click on a generic element. That fixes the common accessibility failure where :focus was used to remove outlines entirely. WebKit shipped it in Safari Technology Preview 138 alongside expanded Web Platform Tests, which aligned heuristics across engines; for example, clicking a div with tabindex=0 no longer shows an indicator. User agent stylesheets now use :focus-visible, so workarounds like :focus:not(:focus-visible) are no longer needed.
Related posts
- Non-interactive Elements with the inert attribute
WebKit mediumAdeptThe HTML inert attribute disables focus, clicks, text selection and editing on an element and its descendants, and hides them from assistive technologies like aria-hidden="true". It replaces piecemeal workarounds such as disabled, tabindex="-1", pointer-events: none and user-select: none, each of which covers only part of the problem. A carousel example uses the inert DOM property in two lines to make inactive slides non-interactive, plus a CSS [inert] opacity cue. Support ships in Safari 15.5, Chrome 102 and Firefox Nightly, with a polyfill suggested for older browsers.
- 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.
- Using :has() as a CSS Parent Selector and much more
WebKit mediumAdeptThe CSS `:has()` pseudo-class, long requested as a "parent selector", lets developers style an element based on its descendants, its following siblings, or the state of elements anywhere in the DOM. WebKit shipped it in Safari 15.4 using new `:has`-specific caching and filtering optimizations. Chrome 105 ships Igalia's implementation, and Firefox is in progress. Hands-on examples cover styling figures and grid cards by their content, the child and sibling combinators inside `:has()`, form-state styling such as `:focus-visible` and `:invalid` labels, and JavaScript-free theme toggles. Some pseudo-classes, including media states and certain form invalidation cases, don't yet update inside `:has()`, so cross-browser testing is recommended.
- The golden rule of Customizable Select
WebKit mediumAdeptCustomizable 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.
- Accessibility considerations behind code search and code view
GitHub Engineering mediumAdeptGitHub rebuilt code search and code view to remove accessibility barriers that pushed screen reader users toward raw files. After a sort change triggers a full page navigation, focus is restored to the sort dropdown. After a search, focus moves to the results-count header instead of using aria-live announcements, which race with page-title announcements. The file tree became the open-source TreeView component, with typeahead and strict ARIA markup. Code reading uses a hidden <textarea> modeled on Monaco, layered under syntax-highlighted virtualized lines with a synced fake cursor. That design enables native screen reader navigation, find and select-all, but brings costs: scroll syncing, cross-browser quirks, and Firefox text-zoom mismatches.