Bug 211934
Summary: | AX: aria-modal="true" autofocuses the first focusable child when inside an iframe | ||
---|---|---|---|
Product: | WebKit | Reporter: | Devon Govett <govett> |
Component: | Accessibility | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | Normal | CC: | cfleizach, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 13 | ||
Hardware: | All | ||
OS: | All |
Devon Govett
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/63249533>
chris fleizach
(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.