[Webkit-unassigned] [Bug 281209] New: Focus lost for after closing file input menu

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 10 01:45:22 PDT 2024


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

            Bug ID: 281209
           Summary: Focus lost for after closing file input menu
           Product: WebKit
           Version: Other
          Hardware: iPhone / iPad
                OS: All
            Status: NEW
          Severity: Major
          Priority: P2
         Component: Accessibility
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: giladbar6 at gmail.com
                CC: andresg_22 at apple.com,
                    webkit-bug-importer at group.apple.com

Created attachment 472893

  --> https://bugs.webkit.org/attachment.cgi?id=472893&action=review

A codepen displaying the issue

After closing the file input menu - focus isn't restored to the previous element in the screen.
Furthermore - even if focus is restored manually, the browser "steals" the focus and moves it to another random element.

This is bad for screen reader users that rely on the focus order.

This doesn't happen in Android Chrome.

Steps to reproduce (codepen example - https://codepen.io/giladbar6/pen/XWwvOEr)
- Use voiceover on iPhone to reproduce
- Create custom button that triggers a click on a file input
- At this point, focus is on the custom button
- The file input menu opens - close it (the menu has an invisible control to close which is accessible with a screen reader)
- Manually restore the focus to the custom button
- Notice: focus is thrown away to a different element

Note: this is a codepen repro but actually happens in my app as well

-- 
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/20241010/bd5adc6a/attachment.htm>


More information about the webkit-unassigned mailing list