<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>233645</bug_id>
          
          <creation_ts>2021-11-30 10:41:51 -0800</creation_ts>
          <short_desc>VoiceOver does not announce custom element focused with delegatesFocus</short_desc>
          <delta_ts>2021-11-30 10:42:15 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Accessibility</component>
          <version>Safari 15</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Liam DeBeasi">ldebeasi</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andresg_22</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1818818</commentid>
    <comment_count>0</comment_count>
      <attachid>445439</attachid>
    <who name="Liam DeBeasi">ldebeasi</who>
    <bug_when>2021-11-30 10:41:51 -0800</bug_when>
    <thetext>Created attachment 445439
Code reproduction

When focusing a custom element that uses `delegatesFocus`, VoiceOver does not announce the element despite it being focused.

Steps to reproduce:

1. Open attached code reproduction on an iOS device.
2. Enable VoiceOver.
3. Inspect this page in Safari Developer Tools.
4. Run &quot;document.querySelector(&apos;app-button&apos;).focus()&quot;. Observe that VoiceOver does not read the button component even though focus is shifted to it.
5. Run &quot;document.querySelector(&apos;button&apos;).focus()&quot;. Observe that VoiceOver does read the button.
6. Run &quot;document.querySelector(&apos;app-button&apos;).focus()&quot; again. Observe that VoiceOver reads the button component this time.

Expected Behavior:

I would expect VoiceOver to announce the text of the custom element every time focus moves to it.

Actual Behavior:

VoiceOver only announces the text of the custom element after first focusing something in the light DOM such as a button.

Other Information:

- I can reproduce this on iOS 15.1 as well as the iOS 15.2 developer beta.
- This issue does not reproduce on Safari for macOS.
- This issue does not reproduce in Chrome.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1818819</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-11-30 10:42:15 -0800</bug_when>
    <thetext>&lt;rdar://problem/85873650&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>445439</attachid>
            <date>2021-11-30 10:41:51 -0800</date>
            <delta_ts>2021-11-30 10:41:51 -0800</delta_ts>
            <desc>Code reproduction</desc>
            <filename>index.html</filename>
            <type>text/html</type>
            <size>1415</size>
            <attacher name="Liam DeBeasi">ldebeasi</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgogIDxoZWFkPgogICAgPHRpdGxlPkRlbGVnYXRlRm9jdXMg
Vm9pY2VPdmVyIElzc3VlPC90aXRsZT4KCiAgICA8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVu
dD0idmlld3BvcnQtZml0PWNvdmVyLHdpZHRoPWRldmljZS13aWR0aCwgaW5pdGlhbC1zY2FsZT0x
LjAsIG1pbmltdW0tc2NhbGU9MS4wLCBtYXhpbXVtLXNjYWxlPTEuMCwgdXNlci1zY2FsYWJsZT1u
byIgLz4KICA8L2hlYWQ+CiAgPGJvZHk+CiAgICA8ZGl2Pkp1c3Qgc29tZSB0ZXh0PC9kaXY+IDxi
ciAvPgogICAgCiAgICA8YXBwLWJ1dHRvbj5DdXN0b20gRWxlbWVudCBCd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Agc3VwZXIoKTsKICAgICAgICAgIGNv
bnN0IHJvb3QgPSB0aGlzLmF0dGFjaFNoYWRvdyh7CiAgICAgICAgICAgIG1vZGU6ICdvcGVuJywK
ICAgICAgICAgICAgZGVsZWdhdGVzRm9jdXM6IHRydWUKICAgICAgICAgIH0pOwogICAgICAgICAg
cm9vdC5pbm5lckhUTUwgPSAnPGJ1dHRvbj48c2xvdD48L3Nsb3Q+PC9idXR0b24+JwogICAgICAg
IH0KICAgICAgfQogICAgICAKICAgICAgY3VzdG9tRWxlbWVudHMuZGVmaW5lKCdhcHAtYnV0dG9u
JywgQXBwQnV0dG9uKTsKICAgIDwvc2NyaXB0PgogIDwvYm9keT4KPC9odG1sPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>