Bug 1577759 - add highlighter support for a keyboard check for non-focusable non-semantic elements. r=rcaliman
authorYura Zenevich <yura.zenevich@gmail.com>
Mon, 02 Sep 2019 12:31:03 +0000
changeset 491201 bb93809181cf38ac5bb295ee4bfe148c72106689
parent 491200 db44fcfe3ee3279c45b290d7a4441eba277329bc
child 491202 de24dca77618399972b7589ed854b66ccc2a7778
push id94252
push useryura.zenevich@gmail.com
push dateMon, 02 Sep 2019 12:58:39 +0000
treeherderautoland@de24dca77618 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrcaliman
bugs1577759
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1577759 - add highlighter support for a keyboard check for non-focusable non-semantic elements. r=rcaliman Depends on D44231 Differential Revision: https://phabricator.services.mozilla.com/D44232
devtools/server/actors/highlighters/utils/accessibility.js
devtools/shared/locales/en-US/accessibility.properties
--- a/devtools/server/actors/highlighters/utils/accessibility.js
+++ b/devtools/server/actors/highlighters/utils/accessibility.js
@@ -29,16 +29,17 @@ const {
   accessibility: {
     AUDIT_TYPE,
     ISSUE_TYPE: {
       [AUDIT_TYPE.KEYBOARD]: {
         FOCUSABLE_NO_SEMANTICS,
         FOCUSABLE_POSITIVE_TABINDEX,
         INTERACTIVE_NO_ACTION,
         INTERACTIVE_NOT_FOCUSABLE,
+        MOUSE_INTERACTIVE_ONLY,
         NO_FOCUS_VISIBLE,
       },
       [AUDIT_TYPE.TEXT_LABEL]: {
         AREA_NO_NAME_FROM_ALT,
         DIALOG_NO_NAME,
         DOCUMENT_NO_TITLE,
         EMBED_NO_NAME,
         FIGURE_NO_NAME,
@@ -679,16 +680,17 @@ class Keyboard extends AuditReport {
    * A map from keyboard issues to annotation component properties.
    */
   static get ISSUE_TO_INFOBAR_LABEL_MAP() {
     return {
       [FOCUSABLE_NO_SEMANTICS]: "accessibility.keyboard.issue.semantics",
       [FOCUSABLE_POSITIVE_TABINDEX]: "accessibility.keyboard.issue.tabindex",
       [INTERACTIVE_NO_ACTION]: "accessibility.keyboard.issue.action",
       [INTERACTIVE_NOT_FOCUSABLE]: "accessibility.keyboard.issue.focusable",
+      [MOUSE_INTERACTIVE_ONLY]: "accessibility.keyboard.issue.mouse.only",
       [NO_FOCUS_VISIBLE]: "accessibility.keyboard.issue.focus.visible",
     };
   }
 
   buildMarkup(root) {
     createNode(this.win, {
       nodeType: "span",
       parent: root,
--- a/devtools/shared/locales/en-US/accessibility.properties
+++ b/devtools/shared/locales/en-US/accessibility.properties
@@ -130,8 +130,13 @@ accessibility.keyboard.issue.action=Inte
 # describes that currently selected accessible object is interactive but is not
 # focusable with a keyboard.
 accessibility.keyboard.issue.focusable=Interactive elements must be focusable.
 
 # LOCALIZATION NOTE (accessibility.keyboard.issue.focus.visible): A title text
 # that describes that currently selected accessible object is focusable but
 # might not have appropriate focus styling.
 accessibility.keyboard.issue.focus.visible=Focusable element may be missing focus styling.
+
+# LOCALIZATION NOTE (accessibility.keyboard.issue.mouse.only): A title text that
+# describes that currently selected accessible object is not focusable and not
+# semantic but can be activated via mouse (e.g. has click handler).
+accessibility.keyboard.issue.mouse.only=Clickable elements must be focusable and should have interactive semantics.