Backed out 2 changesets (bug 1473690) for jsat/test_content_integration.html failures CLOSED TREE
authorBogdan Tara <btara@mozilla.com>
Sun, 22 Jul 2018 06:55:41 +0300
changeset 482787 a10e41860e7d
parent 482786 b41a71c9e2e0
child 482790 05d5b407013c
child 482795 c151c08b5864
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1473690
milestone63.0a1
backs outb41a71c9e2e0
6ca2392ff3f9
first release with
nightly linux32
a10e41860e7d / 63.0a1 / 20180722100230 / files
nightly linux64
a10e41860e7d / 63.0a1 / 20180722100230 / files
nightly mac
a10e41860e7d / 63.0a1 / 20180722100230 / files
nightly win32
a10e41860e7d / 63.0a1 / 20180722100230 / files
nightly win64
a10e41860e7d / 63.0a1 / 20180722100230 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 2 changesets (bug 1473690) for jsat/test_content_integration.html failures CLOSED TREE Backed out changeset b41a71c9e2e0 (bug 1473690) Backed out changeset 6ca2392ff3f9 (bug 1473690)
accessible/jsat/AccessFu.jsm
accessible/jsat/ContentControl.jsm
accessible/jsat/EventManager.jsm
accessible/jsat/OutputGenerator.jsm
accessible/jsat/Presentation.jsm
accessible/jsat/Utils.jsm
accessible/tests/mochitest/jsat/test_content_integration.html
mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/AccessibilityTest.kt
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
--- a/accessible/jsat/AccessFu.jsm
+++ b/accessible/jsat/AccessFu.jsm
@@ -403,19 +403,22 @@ var Input = {
     mm.sendAsyncMessage("AccessFu:SetSelection", aDetails);
   },
 
   clipboard: function clipboard(aDetails) {
     const mm = Utils.getMessageManager();
     mm.sendAsyncMessage("AccessFu:Clipboard", aDetails);
   },
 
-  activateCurrent: function activateCurrent(aData) {
+  activateCurrent: function activateCurrent(aData, aActivateIfKey = false) {
     let mm = Utils.getMessageManager();
-    mm.sendAsyncMessage("AccessFu:Activate", { offset: 0 });
+    let offset = 0;
+
+    mm.sendAsyncMessage("AccessFu:Activate",
+                        {offset, activateIfKey: aActivateIfKey});
   },
 
   // XXX: This is here for backwards compatability with screen reader simulator
   // it should be removed when the extension is updated on amo.
   scroll: function scroll(aPage, aHorizontal) {
     this.sendScrollMessage(aPage, aHorizontal);
   },
 
--- a/accessible/jsat/ContentControl.jsm
+++ b/accessible/jsat/ContentControl.jsm
@@ -181,16 +181,26 @@ this.ContentControl.prototype = {
     this.autoMove(null, aMessage.json);
   },
 
   handleActivate: function cc_handleActivate(aMessage) {
     let activateAccessible = (aAccessible) => {
       Logger.debug(() => {
         return ["activateAccessible", Logger.accessibleToString(aAccessible)];
       });
+      try {
+        if (aMessage.json.activateIfKey &&
+          !Utils.isActivatableOnFingerUp(aAccessible)) {
+          // Only activate keys, don't do anything on other objects.
+          return;
+        }
+      } catch (e) {
+        // accessible is invalid. Silently fail.
+        return;
+      }
 
       if (aAccessible.actionCount > 0) {
         aAccessible.doAction(0);
       } else {
         let control = Utils.getEmbeddedControl(aAccessible);
         if (control && control.actionCount > 0) {
           control.doAction(0);
         }
@@ -214,19 +224,18 @@ this.ContentControl.prototype = {
         for (let eventType of ["mousedown", "mouseup"]) {
           let evt = this.document.createEvent("MouseEvents");
           evt.initMouseEvent(eventType, true, true, this.window,
             x, y, 0, 0, 0, false, false, false, false, 0, null);
           node.dispatchEvent(evt);
         }
       }
 
-      // Action invoked will be presented on checked/selected state change.
-      if (!Utils.getState(aAccessible).contains(States.CHECKABLE) &&
-          !Utils.getState(aAccessible).contains(States.SELECTABLE)) {
+      if (!Utils.isActivatableOnFingerUp(aAccessible)) {
+        // Keys will typically have a sound of their own.
         this._contentScope.get().sendAsyncMessage("AccessFu:Present",
           Presentation.actionInvoked(aAccessible, "click"));
       }
     };
 
     let focusedAcc = Utils.AccService.getAccessibleFor(
       this.document.activeElement);
     if (focusedAcc && this.vc.position === focusedAcc
--- a/accessible/jsat/EventManager.jsm
+++ b/accessible/jsat/EventManager.jsm
@@ -145,36 +145,48 @@ this.EventManager.prototype = {
         const position = event.newAccessible;
 
         // We pass control to the vc in the embedded frame.
         if (position && position.role == Roles.INTERNAL_FRAME) {
           break;
         }
 
         // Blur to document if new position is not explicitly focused.
-        if (!position || !Utils.getState(position).contains(States.FOCUSED)) {
+        if (!Utils.getState(position).contains(States.FOCUSED)) {
           aEvent.accessibleDocument.takeFocus();
         }
 
         this.present(
           Presentation.pivotChanged(position, event.oldAccessible,
                                     event.newStartOffset, event.newEndOffset,
                                     event.reason, event.boundaryType));
 
         break;
       }
       case Events.STATE_CHANGE:
       {
-        const event = aEvent.QueryInterface(Ci.nsIAccessibleStateChangeEvent);
-        const state = Utils.getState(event);
+        let event = aEvent.QueryInterface(Ci.nsIAccessibleStateChangeEvent);
+        let state = Utils.getState(event);
         if (state.contains(States.CHECKED)) {
-          this.present(Presentation.checked(aEvent.accessible));
+          if (aEvent.accessible.role === Roles.SWITCH) {
+            this.present(
+              Presentation.
+                actionInvoked(aEvent.accessible,
+                              event.isEnabled ? "on" : "off"));
+          } else {
+            this.present(
+              Presentation.
+                actionInvoked(aEvent.accessible,
+                              event.isEnabled ? "check" : "uncheck"));
+          }
         } else if (state.contains(States.SELECTED)) {
-          this.present(Presentation.selected(aEvent.accessible,
-                                             event.isEnabled ? "select" : "unselect"));
+          this.present(
+            Presentation.
+              actionInvoked(aEvent.accessible,
+                            event.isEnabled ? "select" : "unselect"));
         }
         break;
       }
       case Events.NAME_CHANGE:
       {
         let acc = aEvent.accessible;
         if (acc === this.contentControl.vc.position) {
           this.present(Presentation.nameChanged(acc));
--- a/accessible/jsat/OutputGenerator.jsm
+++ b/accessible/jsat/OutputGenerator.jsm
@@ -765,30 +765,42 @@ var UtteranceGenerator = {  // jshint ig
   _addRole: function _addRole(aOutput, aAccessible, aRoleStr) {
     if (this.mathmlRolesSet.has(aAccessible.role)) {
       this._addMathRoles(aOutput, aAccessible, aRoleStr);
     } else {
       aOutput.push({string: this._getOutputName(aRoleStr)});
     }
   },
 
-  /**
-   * Add localized state information to output data.
-   * Note: We do not expose checked and selected states, we let TalkBack do it for us
-   * there. This is because we expose the checked information on the node info itself.
-   */
   _addState: function _addState(aOutput, aState, aRoleStr) {
+
     if (aState.contains(States.UNAVAILABLE)) {
       aOutput.push({string: "stateUnavailable"});
     }
 
     if (aState.contains(States.READONLY)) {
       aOutput.push({string: "stateReadonly"});
     }
 
+    // Don't utter this in Jelly Bean, we let TalkBack do it for us there.
+    // This is because we expose the checked information on the node itself.
+    // XXX: this means the checked state is always appended to the end,
+    // regardless of the utterance ordering preference.
+    if ((Utils.AndroidSdkVersion < 16 || Utils.MozBuildApp === "browser") &&
+      aState.contains(States.CHECKABLE)) {
+      let checked = aState.contains(States.CHECKED);
+      let statetr;
+      if (aRoleStr === "switch") {
+        statetr = checked ? "stateOn" : "stateOff";
+      } else {
+        statetr = checked ? "stateChecked" : "stateNotChecked";
+      }
+      aOutput.push({string: statetr});
+    }
+
     if (aState.contains(States.PRESSED)) {
       aOutput.push({string: "statePressed"});
     }
 
     if (aState.contains(States.EXPANDABLE)) {
       let statetr = aState.contains(States.EXPANDED) ?
         "stateExpanded" : "stateCollapsed";
       aOutput.push({string: statetr});
@@ -800,16 +812,20 @@ var UtteranceGenerator = {  // jshint ig
 
     if (aState.contains(States.TRAVERSED)) {
       aOutput.push({string: "stateTraversed"});
     }
 
     if (aState.contains(States.HASPOPUP)) {
       aOutput.push({string: "stateHasPopup"});
     }
+
+    if (aState.contains(States.SELECTED)) {
+      aOutput.push({string: "stateSelected"});
+    }
   },
 
   _getListUtterance:
     function _getListUtterance(aAccessible, aRoleStr, aFlags, aItemCount) {
       let utterance = [];
       this._addRole(utterance, aAccessible, aRoleStr);
       utterance.push({
         string: this._getOutputName("listItemsCount"),
--- a/accessible/jsat/Presentation.jsm
+++ b/accessible/jsat/Presentation.jsm
@@ -93,48 +93,35 @@ class AndroidPresentor {
 
   focused(aObject) {
     let info = this._infoFromContext(
       new PivotContext(aObject, null, -1, -1, true, false));
     return [{ eventType: AndroidEvents.VIEW_FOCUSED, ...info }];
   }
 
   /**
-   * An object's check action has been invoked.
-   * Note: Checkable objects use TalkBack's text derived from the event state, so we don't
-   * populate the text here.
-   * @param {nsIAccessible} aAccessible the object that has been invoked.
+   * An object's action has been invoked.
+   * @param {nsIAccessible} aObject the object that has been invoked.
+   * @param {string} aActionName the name of the action.
    */
-  checked(aAccessible) {
+  actionInvoked(aObject, aActionName) {
+    let state = Utils.getState(aObject);
+
+    // Checkable objects use TalkBack's text derived from the event state,
+    // so we don't populate the text here.
+    let text = null;
+    if (!state.contains(States.CHECKABLE)) {
+      text = Utils.localize(UtteranceGenerator.genForAction(aObject,
+        aActionName));
+    }
+
     return [{
       eventType: AndroidEvents.VIEW_CLICKED,
-      checked: Utils.getState(aAccessible).contains(States.CHECKED)
-    }];
-  }
-
-  /**
-   * An object's select action has been invoked.
-   * @param {nsIAccessible} aAccessible the object that has been invoked.
-   */
-  selected(aAccessible, aActionName) {
-    return [{
-      eventType: AndroidEvents.VIEW_CLICKED,
-      selected: Utils.getState(aAccessible).contains(States.SELECTED)
-    }];
-  }
-
-  /**
-   * An object's action has been invoked.
-   * @param {nsIAccessible} aAccessible the object that has been invoked.
-   * @param {string} aActionName the name of the action.
-   */
-  actionInvoked(aAccessible, aActionName) {
-    return [{
-      eventType: AndroidEvents.VIEW_CLICKED,
-      text: Utils.localize(UtteranceGenerator.genForAction(aAccessible, aActionName))
+      text,
+      checked: state.contains(States.CHECKED)
     }];
   }
 
   /**
    * Text has changed, either by the user or by the system. TODO.
    */
   textChanged(aAccessible, aIsInserted, aStart, aLength, aText, aModifiedText) {
     let androidEvent = {
@@ -300,17 +287,16 @@ class AndroidPresentor {
     const info = {
       bounds: aContext.bounds,
       focusable: state.contains(States.FOCUSABLE),
       focused: state.contains(States.FOCUSED),
       clickable: aContext.accessible.actionCount > 0,
       checkable: state.contains(States.CHECKABLE),
       checked: state.contains(States.CHECKED),
       editable: state.contains(States.EDITABLE),
-      selected: state.contains(States.SELECTED)
     };
 
     if (EDIT_TEXT_ROLES.has(aContext.accessible.role)) {
       let textAcc = aContext.accessible.QueryInterface(Ci.nsIAccessibleText);
       return {
         ...info,
         className: "android.widget.EditText",
         hint: aContext.accessible.name,
--- a/accessible/jsat/Utils.jsm
+++ b/accessible/jsat/Utils.jsm
@@ -380,16 +380,24 @@ var Utils = { // jshint ignore:line
                                                     aExcludeOrdered) {
     let parent = aStaticText.parent;
     if (aExcludeOrdered && parent.parent.DOMNode.nodeName === "OL") {
       return false;
     }
 
     return parent.role === Roles.LISTITEM && parent.childCount > 1 &&
       aStaticText.indexInParent === 0;
+  },
+
+  isActivatableOnFingerUp: function isActivatableOnFingerUp(aAccessible) {
+    if (aAccessible.role === Roles.KEY) {
+      return true;
+    }
+    let quick_activate = this.getAttributes(aAccessible)["moz-quick-activate"];
+    return quick_activate && JSON.parse(quick_activate);
   }
 };
 
 /**
  * State object used internally to process accessible's states.
  * @param {Number} aBase     Base state.
  * @param {Number} aExtended Extended state.
  */
--- a/accessible/tests/mochitest/jsat/test_content_integration.html
+++ b/accessible/tests/mochitest/jsat/test_content_integration.html
@@ -42,18 +42,19 @@
       runner.eventTextMatches(evt, ["such app", "wow", "heading level 1"]);
       runner.isFocused("iframe");
 
       evt = await runner.moveNext("Simple",
         AndroidEvents.VIEW_ACCESSIBILITY_FOCUSED);
       runner.eventTextMatches(evt, ["many option", "not checked", "check button", "First item", "list", "1 item"]);
 
       evt = await runner.activateCurrent(0,
+        AndroidEvents.VIEW_CLICKED,
         AndroidEvents.VIEW_CLICKED);
-      is(evt.checked, true, "checkbox is checked");
+      is(evt[1].checked, true, "checkbox is checked");
 
       evt = await runner.moveNext("Simple",
         AndroidEvents.VIEW_ACCESSIBILITY_FOCUSED);
       runner.eventTextMatches(evt, ["many option"]);
 
       evt = await runner.moveNext("Simple",
         AndroidEvents.VIEW_ACCESSIBILITY_FOCUSED);
       runner.eventTextMatches(evt, ["much range", "label"]);
@@ -74,30 +75,32 @@
         AndroidEvents.VIEW_ACCESSIBILITY_FOCUSED);
       runner.eventTextMatches(evt, ["apple", "button"]);
 
       evt = await runner.moveNext("Simple",
         AndroidEvents.VIEW_ACCESSIBILITY_FOCUSED);
       runner.eventTextMatches(evt, ["Light", "off", "switch"]);
 
       evt = await runner.activateCurrent(0,
+        AndroidEvents.VIEW_CLICKED,
         AndroidEvents.VIEW_CLICKED);
-      is(evt.checked, true, "checkbox is checked");
+      is(evt[1].checked, true, "checkbox is checked");
 
       evt = await runner.moveNext("Simple",
         AndroidEvents.VIEW_ACCESSIBILITY_FOCUSED);
       runner.eventTextMatches(evt, ["slider", "0", "slider", "live"]);
 
       evt = await runner.movePrevious("Simple",
         AndroidEvents.VIEW_ACCESSIBILITY_FOCUSED);
       runner.eventTextMatches(evt, ["Light", "on", "switch"]);
 
       evt = await runner.activateCurrent(0,
+        AndroidEvents.VIEW_CLICKED,
         AndroidEvents.VIEW_CLICKED);
-      is(evt.checked, false, "checkbox is checked");
+      is(evt[1].checked, false, "checkbox is checked");
 
       evt = await runner.movePrevious("Simple",
         AndroidEvents.VIEW_ACCESSIBILITY_FOCUSED);
       runner.eventTextMatches(evt, ["apple", "button"]);
 
       evt = await runner.movePrevious("Simple",
         AndroidEvents.VIEW_ACCESSIBILITY_FOCUSED);
       runner.eventTextMatches(evt, ["Home", "button"]);
@@ -122,18 +125,19 @@
         AndroidEvents.VIEW_ACCESSIBILITY_FOCUSED);
       runner.eventTextMatches(evt, ["many option", "label", "First item", "list", "1 item"]);
 
       evt = await runner.movePrevious("Simple",
         AndroidEvents.VIEW_ACCESSIBILITY_FOCUSED);
       runner.eventTextMatches(evt, ["many option", "checked", "check button"]);
 
       evt = await runner.activateCurrent(0,
+        AndroidEvents.VIEW_CLICKED,
         AndroidEvents.VIEW_CLICKED);
-      is(evt.checked, false, "checkbox is checked");
+      is(evt[1].checked, false, "checkbox is checked");
 
       evt = await runner.movePrevious("Simple",
         AndroidEvents.VIEW_ACCESSIBILITY_FOCUSED);
       runner.eventTextMatches(evt, ["wow", "heading level 1"]);
 
       evt = await runner.movePrevious("Simple",
         AndroidEvents.VIEW_ACCESSIBILITY_FOCUSED);
       runner.eventTextMatches(evt, ["Back", "button"]);
--- a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/AccessibilityTest.kt
+++ b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/AccessibilityTest.kt
@@ -57,17 +57,16 @@ class AccessibilityTest : BaseSessionTes
             return getVirtualDescendantId(getSourceIdMethod.invoke(event) as Long)
         } catch (ex: Exception) {
             return 0
         }
     }
 
     private interface EventDelegate {
         fun onAccessibilityFocused(event: AccessibilityEvent) { }
-        fun onClicked(event: AccessibilityEvent) { }
         fun onFocused(event: AccessibilityEvent) { }
         fun onTextSelectionChanged(event: AccessibilityEvent) { }
         fun onTextChanged(event: AccessibilityEvent) { }
         fun onTextTraversal(event: AccessibilityEvent) { }
     }
 
     @Before fun setup() {
         // We initialize a view with a parent and grandparent so that the
@@ -83,17 +82,16 @@ class AccessibilityTest : BaseSessionTes
 
         // Set up an external delegate that will intercept accessibility events.
         sessionRule.addExternalDelegateUntilTestEnd(
             EventDelegate::class,
         { newDelegate -> (view.parent as View).setAccessibilityDelegate(object : View.AccessibilityDelegate() {
             override fun onRequestSendAccessibilityEvent(host: ViewGroup, child: View, event: AccessibilityEvent): Boolean {
                 when (event.eventType) {
                     AccessibilityEvent.TYPE_VIEW_FOCUSED -> newDelegate.onFocused(event)
-                    AccessibilityEvent.TYPE_VIEW_CLICKED -> newDelegate.onClicked(event)
                     AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED -> newDelegate.onAccessibilityFocused(event)
                     AccessibilityEvent.TYPE_VIEW_TEXT_SELECTION_CHANGED -> newDelegate.onTextSelectionChanged(event)
                     AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED -> newDelegate.onTextChanged(event)
                     AccessibilityEvent.TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY -> newDelegate.onTextTraversal(event)
                     else -> {}
                 }
                 return false
             }
@@ -192,35 +190,16 @@ class AccessibilityTest : BaseSessionTes
             @AssertCalled(count = 1)
             override fun onTextTraversal(event: AccessibilityEvent) {
               assertThat("fromIndex matches", event.fromIndex, equalTo(fromIndex))
               assertThat("toIndex matches", event.toIndex, equalTo(toIndex))
             }
         })
     }
 
-    private fun waitUntilClick(checked: Boolean? = null, selected: Boolean? = null) {
-        sessionRule.waitUntilCalled(object : EventDelegate {
-            @AssertCalled(count = 1)
-            override fun onClicked(event: AccessibilityEvent) {
-                var nodeId = getSourceId(event)
-                var node = provider.createAccessibilityNodeInfo(nodeId)
-
-                if (checked != null) {
-                    assertThat("Event's checked state matches", event.isChecked, equalTo(checked))
-                    assertThat("Checkbox node has correct checked state", node.isChecked, equalTo(checked))
-                }
-
-                if (selected != null) {
-                    assertThat("Selectable node has correct selected state", node.isSelected, equalTo(selected))
-                }
-            }
-        })
-    }
-
     private fun setSelectionArguments(start: Int, end: Int): Bundle {
         val arguments = Bundle(2)
         arguments.putInt(AccessibilityNodeInfo.ACTION_ARGUMENT_SELECTION_START_INT, start)
         arguments.putInt(AccessibilityNodeInfo.ACTION_ARGUMENT_SELECTION_END_INT, end)
         return arguments
     }
 
     private fun moveByGranularityArguments(granularity: Int, extendSelection: Boolean = false): Bundle {
@@ -374,63 +353,9 @@ class AccessibilityTest : BaseSessionTes
                 moveByGranularityArguments(AccessibilityNodeInfo.MOVEMENT_GRANULARITY_LINE))
         waitUntilTextTraversed(18, 28) // "sit amet, "
 
         provider.performAction(nodeId,
                 AccessibilityNodeInfo.ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY,
                 moveByGranularityArguments(AccessibilityNodeInfo.MOVEMENT_GRANULARITY_LINE))
         waitUntilTextTraversed(0, 18) // "Lorem ipsum dolor "
     }
-
-    @Test fun testCheckbox() {
-        var nodeId = AccessibilityNodeProvider.HOST_VIEW_ID;
-        sessionRule.session.loadString("<label><input id='checkbox' type='checkbox'>many option</label>", "text/html")
-        sessionRule.waitForPageStop()
-
-        mainSession.evaluateJS("$('#checkbox').focus()")
-        sessionRule.waitUntilCalled(object : EventDelegate {
-            @AssertCalled(count = 1)
-            override fun onAccessibilityFocused(event: AccessibilityEvent) {
-                nodeId = getSourceId(event)
-                var node = provider.createAccessibilityNodeInfo(nodeId)
-                assertThat("Checkbox node is checkable", node.isCheckable, equalTo(true))
-                assertThat("Checkbox node is clickable", node.isClickable, equalTo(true))
-                assertThat("Checkbox node is focusable", node.isFocusable, equalTo(true))
-                assertThat("Checkbox node is not checked", node.isChecked, equalTo(false))
-                assertThat("Checkbox node has correct role", node.text.toString(), equalTo("many option check button"))
-            }
-        })
-
-        provider.performAction(nodeId, AccessibilityNodeInfo.ACTION_CLICK, null)
-        waitUntilClick(checked = true)
-
-        provider.performAction(nodeId, AccessibilityNodeInfo.ACTION_CLICK, null)
-        waitUntilClick(checked = false)
-    }
-
-    @Test fun testSelectable() {
-        var nodeId = View.NO_ID
-        sessionRule.session.loadString(
-                """<ul style="list-style-type: none;" role="listbox">
-                        <li id="li" role="option" onclick="this.setAttribute('aria-selected',
-                            this.getAttribute('aria-selected') == 'true' ? 'false' : 'true')">1</li>
-                </ul>""","text/html")
-        sessionRule.waitForPageStop()
-
-        provider.performAction(nodeId, AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS, null)
-        sessionRule.waitUntilCalled(object : EventDelegate {
-            @AssertCalled(count = 1)
-            override fun onAccessibilityFocused(event: AccessibilityEvent) {
-                nodeId = getSourceId(event)
-                var node = provider.createAccessibilityNodeInfo(nodeId)
-                assertThat("Selectable node is clickable", node.isClickable, equalTo(true))
-                assertThat("Selectable node is not selected", node.isSelected, equalTo(false))
-                assertThat("Selectable node has correct role", node.text.toString(), equalTo("1 option list box"))
-            }
-        })
-
-        provider.performAction(nodeId, AccessibilityNodeInfo.ACTION_CLICK, null)
-        waitUntilClick(selected = true)
-
-        provider.performAction(nodeId, AccessibilityNodeInfo.ACTION_CLICK, null)
-        waitUntilClick(selected = false)
-    }
 }
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
@@ -374,17 +374,16 @@ public class SessionAccessibility {
 
     private void populateNodeInfoFromJSON(AccessibilityNodeInfo node, final GeckoBundle message) {
         node.setEnabled(message.getBoolean("enabled", true));
         node.setCheckable(message.getBoolean("checkable"));
         node.setChecked(message.getBoolean("checked"));
         node.setPassword(message.getBoolean("password"));
         node.setFocusable(message.getBoolean("focusable"));
         node.setFocused(message.getBoolean("focused"));
-        node.setSelected(message.getBoolean("selected"));
 
         node.setClassName(message.getString("className", "android.view.View"));
 
         final String[] textArray = message.getStringArray("text");
         StringBuilder sb = new StringBuilder();
         if (textArray != null && textArray.length > 0) {
             sb.append(textArray[0] != null ? textArray[0] : "");
             for (int i = 1; i < textArray.length; i++) {
@@ -427,25 +426,16 @@ public class SessionAccessibility {
         final float[] origin = new float[2];
         mSession.getClientToScreenMatrix(matrix);
         matrix.mapPoints(origin);
 
         screenBounds.offset((int) -origin[0], (int) -origin[1]);
         node.setBoundsInParent(screenBounds);
     }
 
-    private void updateState(final AccessibilityNodeInfo node, final GeckoBundle message) {
-        if (message.containsKey("checked")) {
-            node.setChecked(message.getBoolean("checked"));
-        }
-        if (message.containsKey("selected")) {
-            node.setSelected(message.getBoolean("selected"));
-        }
-    }
-
     private void sendAccessibilityEvent(final GeckoBundle message) {
         if (mView == null || !Settings.isEnabled())
             return;
 
         final int eventType = message.getInt("eventType", -1);
         if (eventType < 0) {
             Log.e(LOGTAG, "No accessibility event type provided");
             return;
@@ -477,21 +467,16 @@ public class SessionAccessibility {
             }
             mVirtualContentNode = AccessibilityNodeInfo.obtain(mView, eventSource);
             populateNodeInfoFromJSON(mVirtualContentNode, message);
         }
 
         if (mVirtualContentNode != null) {
             // Bounds for the virtual content can be updated from any event.
             updateBounds(mVirtualContentNode, message);
-
-            // State for the virtual content can be updated when view is clicked.
-            if (eventType == AccessibilityEvent.TYPE_VIEW_CLICKED) {
-                updateState(mVirtualContentNode, message);
-            }
         }
 
         final AccessibilityEvent accessibilityEvent = obtainEvent(eventType, eventSource);
         populateEventFromJSON(accessibilityEvent, message);
         ((ViewParent) mView).requestSendAccessibilityEvent(mView, accessibilityEvent);
     }
 
     public boolean onMotionEvent(final MotionEvent event) {