<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#my-button:focus-within {
color: red;
}
</style>
</head>
<body>
<button id="my-button" tabindex="0">item2</button>
</body>
</html>
Upon clicking the button, the text changes to a vibrant shade of red. It has been successfully tested in Chrome and Firefox, but Safari (version 15.6.1) seems to present some issues.
What could be causing this compatibility problem?