WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
253957
[iOS VoiceOver] document.activeElement cannot point to a button that has attribute aria-haspopup
https://bugs.webkit.org/show_bug.cgi?id=253957
Summary
[iOS VoiceOver] document.activeElement cannot point to a button that has attr...
Aaron Hakala
Reported
2023-03-15 05:30:37 PDT
# Summary When using iOS VoiceOver with Safari/Chrome the `document.activeElement` is not pointing to a button that has the attribute `aria-haspopup` instead it returns the `body` element. Removing this attribute causes the the `document.activeElement` to point to the button. I guess this issue might be a symptom of some other focus handling logic. # Example situation 1. A button opens a modal/dialog. This element is recorded by using the `document.activeElement`. 2. Modal captures focus. 3. When modal is closed the focus is returned to the element that opened the modal. If the button has the attribute `aria-haspopup` the `document.activeElement` points to `body` instead of the `button`. Example codepen:
https://codepen.io/aaronkala/pen/wvEmeZL
# Expected behaviour The `document.activeElement` points to the `button` even if it contains the `aria-haspopup` attribute.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-03-15 05:30:48 PDT
<
rdar://problem/106751475
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug