If you have a page in LTR mode and call `document.documentElement.setAttribute('dir', 'rtl')` to force the page to be in RTL mode, you would expect that calling `document.documentElement.removeAttribute('dir')` restores it to the previous state. But in Safari, unlike Chrome and Firefox, nothing happens and the direction mode remains on RTL. You can force it to go back to LRT by calling `document.documentElement.setAttribute('dir', 'ltr'). I couldn't find on the specs (https://html.spec.whatwg.org/multipage/dom.html#the-dir-attribute) any description of how it should behave on this case, but since other browsers that I tested work similarly, meaning that it falls back to the default direction mode, I decided to fill this bug. You can try it on this small example I created: https://jsfiddle.net/diegocardoso/chm7yk5e/7/
<rdar://problem/79842142>
I am unable to reproduce this bug in Safari 16.5, where ticking makes it RTL while unticking make it go back to original state and it matches with Chrome Canary 115 and Firefox Nightly 115. Marking this as "RESOLVED CONFIGURATION CHANGED", if it is still an issue, please reopen with updated test case / reduction.