Make accessibility test discern between ARIA elements and pointer-events: none elements

RESOLVED FIXED in Firefox 57

Status

RESOLVED FIXED
a year ago
a year ago

People

(Reporter: ato, Assigned: ato)

Tracking

Version 3
mozilla57
Points:
---

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

a year ago
The tests for the accessibility features in Marionette
needs to discern between ARIA elements and elements which
are styled with pointer-events: none, because this is
a relevant distinction when Marionette switches to the
WebDriver conforming element interactability implementation in
https://bugzilla.mozilla.org/show_bug.cgi?id=1321516.

With a WebDriver-conforming Element Click implementation, the
element click intercepted error is returned when an element with
pointer-events: "none" causes the click to hit the underlying
element.

However, because we’re not yet using
interaction.webdriverClickElement, we shouldn’t update the
expected errors.
(Assignee)

Updated

a year ago
Assignee: nobody → ato
Blocks: 1321516
Status: NEW → ASSIGNED
Comment hidden (mozreview-request)

Comment 2

a year ago
hg error in cmd: hg push -r . -f try: pushing to ssh://hg.mozilla.org/try
searching for changes
remote: replication log not available; all writes disabled
remote: pretxnopen.vcsreplicator hook failed
abort: push failed on remote

Comment 3

a year ago
mozreview-review
Comment on attachment 8893820 [details]
Bug 1387447 - Update accessibility pointer-events expectations.

https://reviewboard.mozilla.org/r/164932/#review170304

Looks good with the questions addressed. Thanks

::: testing/marionette/harness/marionette_harness/tests/unit/test_accessibility.py:88
(Diff revision 1)
>  
>      disabled_elementIDs = ["button11", "no_accessible_but_disabled"]
>  
> -    # Elements that are enabled but otherwise disabled or not explorable via the accessibility API
> +    # Elements that are enabled but otherwise disabled or not explorable
> +    # via the accessibility API
> +    aria_disabled_elements = ["button12"]

nit here and for the other list, can we change _elements to elementIDs to be consistent with the other lists.

::: testing/marionette/harness/marionette_harness/tests/unit/test_accessibility.py:96
(Diff revision 1)
> +    # ElementClickInterceptedException if clicked
> +    # when Marionette switches
> +    # to using WebDriver conforming interaction
> +    pointer_events_none_elements = ["button15", "button16"]
> +
>      disabled_accessibility_elementIDs = ["button12", "button15", "button16"]

Doesn't seem to be used any more, should we remove it?

::: testing/marionette/harness/marionette_harness/tests/unit/test_accessibility.py:184
(Diff revision 1)
>          # Buttons are enabled but disabled/not-explorable via the accessibility API
> -        self.run_element_test(self.disabled_accessibility_elementIDs,
> +        self.run_element_test(self.aria_disabled_elements,
> +                              lambda element: self.assertRaises(ElementNotAccessibleException,
> +                                                                element.is_enabled))
> +        self.run_element_test(self.pointer_events_none_elements,
>                                lambda element: self.assertRaises(ElementNotAccessibleException,

I'm guessing we still are getting ElementNotAccessibleException here instead of ElementClickInterceptedException?

::: testing/marionette/harness/marionette_harness/tests/unit/test_accessibility.py:194
(Diff revision 1)
> -        self.run_element_test(self.disabled_accessibility_elementIDs,
> +        # accessibility API.
> +        self.run_element_test(self.aria_disabled_elements,
> +                              lambda element: self.assertRaises(ElementNotAccessibleException,
> +                                                                element.click))
> +        self.run_element_test(self.pointer_events_none_elements,
>                                lambda element: self.assertRaises(ElementNotAccessibleException,

Wouldn't we need to check that ElementClickInterceptedException is raised instead of ElementNotAccessibleException?
Attachment #8893820 - Flags: review?(yzenevich) → review+
(Assignee)

Comment 4

a year ago
mozreview-review-reply
Comment on attachment 8893820 [details]
Bug 1387447 - Update accessibility pointer-events expectations.

https://reviewboard.mozilla.org/r/164932/#review170304

> nit here and for the other list, can we change _elements to elementIDs to be consistent with the other lists.

Sure thing!

> Doesn't seem to be used any more, should we remove it?

My bad, I forgot to take it out.

> I'm guessing we still are getting ElementNotAccessibleException here instead of ElementClickInterceptedException?

Yes.  We will keep getting ElementNotAccessibleException
until we switch over to use interaction.webdriverClickElement
rather than interaction.seleniumClickElement (both
defined in testing/marionette/interaction.js) in
https://bugzilla.mozilla.org/show_bug.cgi?id=1321516.

> Wouldn't we need to check that ElementClickInterceptedException is raised instead of ElementNotAccessibleException?

Per the last comment, these will continue to return
ElementClickInterceptedException until we switch over
to using WebDriver spec conforming interactability in
https://bugzilla.mozilla.org/show_bug.cgi?id=1321516.  This patch is
just to make the transition easier, by pointing out which elements
will get a different error.
Comment hidden (mozreview-request)

Comment 6

a year ago
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f4418ff1ef12
Update accessibility pointer-events expectations. r=yzen
https://hg.mozilla.org/mozilla-central/rev/f4418ff1ef12
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.