Dark mode function needs metadata support?

On UI, when user select light/dark mode in setting pages, browser failed to handle this request. It seems dark mode function needs metadata support as destination of theme information storage.

Is there any documents of this for implementation?