[Webkit-unassigned] [Bug 253957] New: [iOS VoiceOver] document.activeElement cannot point to a button that has attribute aria-haspopup

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 15 05:30:37 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=253957

            Bug ID: 253957
           Summary: [iOS VoiceOver] document.activeElement cannot point to
                    a button that has attribute aria-haspopup
           Product: WebKit
           Version: Safari 16
          Hardware: iPhone / iPad
                OS: iOS 16
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Accessibility
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: aaron.hakala at gmail.com
                CC: andresg_22 at apple.com,
                    webkit-bug-importer at group.apple.com

# 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230315/3db83c4f/attachment-0001.htm>


More information about the webkit-unassigned mailing list