<?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>236725</bug_id>
          
          <creation_ts>2022-02-16 11:59:30 -0800</creation_ts>
          <short_desc>AX: clicking an input radio/checkbox should focus it</short_desc>
          <delta_ts>2022-02-17 19:46:36 -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>Forms</component>
          <version>Safari Technology Preview</version>
          <rep_platform>All</rep_platform>
          <op_sys>macOS 12</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>22261</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Giovanni Piller Cottrer">giovanni.piller</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>tyler_w</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1842430</commentid>
    <comment_count>0</comment_count>
      <attachid>452225</attachid>
    <who name="Giovanni Piller Cottrer">giovanni.piller</who>
    <bug_when>2022-02-16 11:59:30 -0800</bug_when>
    <thetext>Created attachment 452225
test case reduction

Right now, focus doesn&apos;t seem to change on click interactions.

This makes it difficult to use the keyboard to complement mouse interactions.

For example:
1) click on an input radio using the mouse
2) attempt to change the selected radio by using the up/down arrows
Expected: I&apos;m able to modify my selection.
Actual: up/down arrows scroll the page

Or similarly, with checkboxes:
1) check an input checkbox using the mouse
2) attempt to uncheck it by pressing the spacebar
Expected: I&apos;m able to modify my selection.
Actual: nothing happens (page scrolls)

**Note on &lt;label&gt;:** I would also expect that clicking an input&apos;s related &lt;label&gt; would move focus to it, but that&apos;s not the case.

To sum up: it appears that the only way to interact with a radio/checkbox via keyboard, is to first focus it via the keyboard itself. Mouse interactions won&apos;t focus those elements.

Webkit&apos;s behavior is inconsistent with current implementations of other browsers (tested on Firefox 97.0 and Chrome 98.0.4758.102).

I&apos;ve reproduced it with and without the &quot;Press Tab to highlight each item on a webpage&quot; setting enabled, on the following builds:
- 15.3 (17612.4.9.1.5)
- TP Release 140 (Safari 15.4, WebKit 17614.1.1.5)
- Nightly 289904

The reduced test case (attached) is so simple that I have the feeling I&apos;m missing something here. If so, sorry for wasting your time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1843253</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-02-17 19:46:36 -0800</bug_when>
    <thetext>Safari matches platform behavior. It is inappropriate for controls to behave inconsistently just because they happen to be on a web page.

If you would like macOS behavior to change, please submit your feedback to Apple.

*** This bug has been marked as a duplicate of bug 22261 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>452225</attachid>
            <date>2022-02-16 11:59:30 -0800</date>
            <delta_ts>2022-02-16 11:59:30 -0800</delta_ts>
            <desc>test case reduction</desc>
            <filename>bug-reduction.html</filename>
            <type>text/html</type>
            <size>440</size>
            <attacher name="Giovanni Piller Cottrer">giovanni.piller</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgogICAgPGhlYWQ+PC9oZWFkPgogICAgPGJvZHk+CgogICAg
ICAgIDxpbnB1dCBpZD0ibXktcmFkaW8tMSIgdHlwZT0icmFkaW8iIG5hbWU9Im15LXJhZGlvIiB2
YWx1ZT0iMSI+CiAgICAgICAgPGxhYmVsIGZvcj0ibXktcmFkaW8tMSI+T3B0aW9uIDE8L2xhYmVs
PgoKICAgICAgICA8aW5wdXQgaWQ9Im15LXJhZGlvLTIiIHR5cGU9InJhZGlvIiBuYW1lPSJteS1y
YWRpbyIgdmFsdWU9IjIiPgogICAgICAgIDxsYWJlbCBmb3I9Im15LXJhZGlvLTIiPk9wdGlvbiAy
PC9sYWJlbD4KCiAgICAgICAgPGhyPgoKICAgICAgICA8aW5wdXQgaWQ9Im15LWNoZWNrYm94IiB0
eXBlPSJjaGVja2JveCIgdmFsdWU9IjMiPgogICAgICAgIDxsYWJlbCBmb3I9Im15LWNoZWNrYm94
Ij5NeSBjaGVja2JveDwvbGFiZWw+CiAgICA8L2JvZHk+CjwvaHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>