RESOLVED WORKSFORME 211934
AX: aria-modal="true" autofocuses the first focusable child when inside an iframe
https://bugs.webkit.org/show_bug.cgi?id=211934
Summary AX: aria-modal="true" autofocuses the first focusable child when inside an if...
Devon Govett
Reported 2020-05-14 16:53:48 PDT
When rendering a dialog with `aria-modal="true"` inside an iframe, Safari auto focuses the first focusable child of the dialog, even though the dialog itself is focused by JavaScript. No other browsers seem to have this behavior. Reproduction: https://b3gkn.csb.app - the close button will be auto focused in Safari, after a flash of focus being on the dialog itself. Opening the iframe page directly does not cause the issue: https://b3gkn.csb.app/iframe.html. Source code for the reproduction: https://codesandbox.io/s/objective-currying-b3gkn?file=/index.html I wouldn't expect the browser to auto focus anything with `aria-modal="true"` (AFAIK no other browsers do this), but if it does, it should respect the element that the developer focuses with JavaScript.
Attachments
Radar WebKit Bug Importer
Comment 1 2020-05-14 16:53:58 PDT
chris fleizach
Comment 2 2021-02-01 12:05:58 PST
(In reply to Radar WebKit Bug Importer from comment #1) > <rdar://problem/63249533> on iOS, VoiceOver can't focus on a "group" like a dialog. it needs to focus on one of the flat elements in the list of elements to navigate. I think in the absence of further guidance it picks an element to land on.
Note You need to log in before you can comment on or make changes to this bug.