← Back to release summary

CaptureStartFocusBehavior enum value "focus-capturing-application"

Category
WebRTC
Type
Chromium catches up
Status
Enabled by default (Chrome 119)
Intent stage
None

Summary

The Screen Capture API lets the user select a tab, window, or screen to capture as a media stream. Using the existing CaptureController setFocusBehavior() method, web apps control whether the captured tab or window will be focused when capture starts, or whether the browser will leave focus with whichever surface last had focus. The new enum value "focus-capturing-application" allows web apps to give a hint to the browser that the capturing page prefers to remain focused. The old value “no-focus-switch” now indicates that the application prefers that the user agent not change focus, leaving focus with whichever surface last had focus following the user's interaction with the user agent and/or operating system. In Chrome’s current implementation, this means leaving the capturing application focused. In the future, if Chrome adopts the macOS picker, it could behave differently on Mac. This behavior could prove useful for a11y-conscious applications that prefer to minimize the number of focus-changes a user experiences, as those can be challenging for users with screen-readers.

Standards & signals

Docs: https://github.com/WICG/conditional-focus/blob/main/README.md

View on chromestatus.com