Closed Bug 1552716 Opened 5 years ago Closed 5 years ago

Protections panel not accessible via the keyboard

Categories

(Firefox :: Site Identity, defect, P1)

defect

Tracking

()

RESOLVED FIXED
Firefox 70
Tracking Status
firefox70 --- fixed

People

(Reporter: Jamie, Assigned: timhuang)

References

Details

(Keywords: access, Whiteboard: [protection-report] [skyline])

Attachments

(3 files)

Impact: The Protections panel is completely inaccessible to keyboard only users (including screen reader users).

STR:

  1. Open a page where the Tracking Protection icon is displayed; e.g. twitter.com.
  2. Press control+l to focus the address bar.
  3. Press shift+tab to focus the identity icon.
  4. Press right arrow to focus the next button in that group.
    • Expected: The Tracking Protection icon should get focus.
    • Actual: Nothing happens.

The Tracking Protection icon (#tracking-protection-icon-animatable-image) needs a role="button" attribute, which exposes it correctly to accessibility clients and will also cause it to be picked up by ToolbarKeyboardNavigator. This should probably have a test either in browser/base/content/test/keyboard/browser_toolbarKeyNav.js or browser/base/content/test/siteIdentity/browser_identityBlock_focus.js.

Forgot to mention that the Tracking Protection icon also needs a label for accessibility. This could be done with aria-label if for some reason this should be accessibility only. However, I think this has a tooltip. If so, you could use tooltiptext instead of generating the tooltip dynamically, and tooltiptext would then get used for the a11y label.

Thank you for filing this. For now, this panel is not intended to be accessible - the click trigger only exists to allow dogfooding the design and UX. We will track this to make sure that the panel is accessible once it lands in its final form.

Priority: -- → P1
Whiteboard: [protection-report] [skyline]
Assignee: nobody → tihuang
Status: NEW → ASSIGNED

This patch fixes the issue that the keyboard navigation doesn't work for
the tracking protection icon.

We need to update the test since '#tracking-protection-icon-container'
is accessible before the '#identity-box'.

Depends on D39329

I will fix the keyboard navigation issue here and leave the tooltip and the label for accessibility in Bug 1567422.

Pushed by tihuang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/45b9bfbc709b Part 1: Fix the keyboard navigation of the tracking protection icon. r=Jamie https://hg.mozilla.org/integration/autoland/rev/63e0cc8a35a8 Part 2: Update the test browser_toolbarKeyNav.js. r=johannh

Backed out 2 changesets (Bug 1552716) for failures on browser_multiselect_tabs_using_keyboard.js

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&fromchange=175824fe62acbf0d5dad31b4ab43bdf09ad44b30&searchStr=linux%2Cx64%2Casan%2Cmochitests%2Ctest-linux64-asan%2Fopt-mochitest-browser-chrome-e10s-8%2Cm%28bc8%29&tochange=768d0733aed368f2c843bd1941ffed3beaedac7b&selectedJob=258809565

Backout link: https://hg.mozilla.org/integration/autoland/rev/768d0733aed368f2c843bd1941ffed3beaedac7b

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=258809565&repo=autoland&lineNumber=2563

[task 2019-07-29T15:16:48.549Z] 15:16:48 INFO - TEST-START | browser/base/content/test/tabs/browser_multiselect_tabs_using_keyboard.js
[task 2019-07-29T15:18:18.561Z] 15:18:18 INFO - TEST-INFO | started process screentopng
[task 2019-07-29T15:18:19.167Z] 15:18:19 INFO - TEST-INFO | screentopng: exit 0
[task 2019-07-29T15:18:19.168Z] 15:18:19 INFO - Buffered messages logged at 15:16:48
[task 2019-07-29T15:18:19.169Z] 15:18:19 INFO - Entering test bound setup
[task 2019-07-29T15:18:19.169Z] 15:18:19 INFO - Console message: [JavaScript Error: "uncaught exception: Object" {file: "resource://testing-common/PromiseTestUtils.jsm" line: 112}]
[task 2019-07-29T15:18:19.170Z] 15:18:19 INFO - Leaving test bound setup
[task 2019-07-29T15:18:19.170Z] 15:18:19 INFO - Entering test bound changeSelectionUsingKeyboard
[task 2019-07-29T15:18:19.170Z] 15:18:19 INFO - Buffered messages logged at 15:16:51
[task 2019-07-29T15:18:19.170Z] 15:18:19 INFO - Move focus to location bar using the keyboard
[task 2019-07-29T15:18:19.171Z] 15:18:19 INFO - TEST-PASS | browser/base/content/test/tabs/browser_multiselect_tabs_using_keyboard.js | urlbar should be focused -
[task 2019-07-29T15:18:19.171Z] 15:18:19 INFO - Move focus to the selected tab using the keyboard
[task 2019-07-29T15:18:19.174Z] 15:18:19 INFO - Buffered messages finished
[task 2019-07-29T15:18:19.175Z] 15:18:19 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/tabs/browser_multiselect_tabs_using_keyboard.js | Test timed out -
[task 2019-07-29T15:18:19.177Z] 15:18:19 INFO - GECKO(2226) | MEMORY STAT | vsize 20975512MB | residentFast 1170MB
[task 2019-07-29T15:18:19.179Z] 15:18:19 INFO - TEST-OK | browser/base/content/test/tabs/browser_multiselect_tabs_using_keyboard.js | took 90080ms
[task 2019-07-29T15:18:19.180Z] 15:18:19 INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-07-29T15:18:19.183Z] 15:18:19 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/tabs/browser_multiselect_tabs_using_keyboard.js | Found a tab after previous test timed out: http://mochi.test:8888/5 -
[task 2019-07-29T15:18:19.184Z] 15:18:19 INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-07-29T15:18:19.186Z] 15:18:19 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/tabs/browser_multiselect_tabs_using_keyboard.js | Found a tab after previous test timed out: http://mochi.test:8888/4 -
[task 2019-07-29T15:18:19.187Z] 15:18:19 INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-07-29T15:18:19.190Z] 15:18:19 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/tabs/browser_multiselect_tabs_using_keyboard.js | Found a tab after previous test timed out: http://mochi.test:8888/3 -
[task 2019-07-29T15:18:19.192Z] 15:18:19 INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-07-29T15:18:19.193Z] 15:18:19 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/tabs/browser_multiselect_tabs_using_keyboard.js | Found a tab after previous test timed out: http://mochi.test:8888/2 -
[task 2019-07-29T15:18:19.195Z] 15:18:19 INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-07-29T15:18:19.196Z] 15:18:19 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/tabs/browser_multiselect_tabs_using_keyboard.js | Found a tab after previous test timed out: http://mochi.test:8888/1 -
[task 2019-07-29T15:18:19.199Z] 15:18:19 INFO - checking window state
[task 2019-07-29T15:18:19.200Z] 15:18:19 INFO - GECKO(2226) | JavaScript error: resource://testing-common/PromiseTestUtils.jsm, line 112: uncaught exception: Object
[task 2019-07-29T15:18:19.202Z] 15:18:19 INFO - TEST-START | browser/base/content/test/tabs/browser_multiselect_tabs_using_selectedTabs.js
[task 2019-07-29T15:18:21.336Z] 15:18:21 INFO - GECKO(2226) | MEMORY STAT | vsize 20975511MB | residentFast 1184MB
[task 2019-07-29T15:18:21.337Z] 15:18:21 INFO - TEST-OK | browser/base/content/test/tabs/browser_multiselect_tabs_using_selectedTabs.js | took 2171ms

Flags: needinfo?(tihuang)

Another failure introduced with these changes:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=258809572&repo=autoland&lineNumber=2616

[task 2019-07-29T15:15:20.832Z] 15:15:20 INFO - TEST-START | browser/base/content/test/siteIdentity/browser_identityBlock_focus.js
[task 2019-07-29T15:16:50.847Z] 15:16:50 INFO - TEST-INFO | started process screentopng
[task 2019-07-29T15:16:51.516Z] 15:16:51 INFO - TEST-INFO | screentopng: exit 0
[task 2019-07-29T15:16:51.518Z] 15:16:51 INFO - Buffered messages logged at 15:15:20
[task 2019-07-29T15:16:51.519Z] 15:16:51 INFO - Entering test bound testWithoutNotifications
[task 2019-07-29T15:16:51.520Z] 15:16:51 INFO - Console message: [JavaScript Error: "uncaught exception: Object" {file: "resource://testing-common/PromiseTestUtils.jsm" line: 112}]
[task 2019-07-29T15:16:51.521Z] 15:16:51 INFO - Buffered messages logged at 15:15:21
[task 2019-07-29T15:16:51.522Z] 15:16:51 INFO - Console message: [JavaScript Warning: "Key event not available on some keyboard layouts: key=“r” modifiers=“accel,alt” id=“key_toggleReaderMode”" {file: "chrome://mochikit/content/tests/SimpleTest/EventUtils.js" line: 870}]
[task 2019-07-29T15:16:51.524Z] 15:16:51 INFO - Console message: [JavaScript Warning: "Key event not available on some keyboard layouts: key=“r” modifiers=“accel,alt” id=“key_quickRestart”" {file: "chrome://mochikit/content/tests/SimpleTest/EventUtils.js" line: 870}]
[task 2019-07-29T15:16:51.525Z] 15:16:51 INFO - Console message: [JavaScript Warning: "Key event not available on some keyboard layouts: key=“i” modifiers=“accel,alt,shift” id=“key_browserToolbox”" {file: "chrome://mochikit/content/tests/SimpleTest/EventUtils.js" line: 870}]
[task 2019-07-29T15:16:51.527Z] 15:16:51 INFO - TEST-PASS | browser/base/content/test/siteIdentity/browser_identityBlock_focus.js | urlbar should be focused -
[task 2019-07-29T15:16:51.528Z] 15:16:51 INFO - Buffered messages finished
[task 2019-07-29T15:16:51.529Z] 15:16:51 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/siteIdentity/browser_identityBlock_focus.js | Test timed out -
[task 2019-07-29T15:16:51.530Z] 15:16:51 INFO - GECKO(2494) | MEMORY STAT | vsize 20975197MB | residentFast 1171MB
[task 2019-07-29T15:16:51.536Z] 15:16:51 INFO - TEST-OK | browser/base/content/test/siteIdentity/browser_identityBlock_focus.js | took 90071ms
[task 2019-07-29T15:16:51.537Z] 15:16:51 INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-07-29T15:16:51.538Z] 15:16:51 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/siteIdentity/browser_identityBlock_focus.js | Found a tab after previous test timed out: https://example.com/ -
[task 2019-07-29T15:16:51.539Z] 15:16:51 INFO - checking window state
[task 2019-07-29T15:16:51.539Z] 15:16:51 INFO - GECKO(2494) | JavaScript error: resource://testing-common/PromiseTestUtils.jsm, line 112: uncaught exception: Object

Flags: needinfo?(tihuang)
Pushed by tihuang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/327832d4b035 Part 1: Fix the keyboard navigation of the tracking protection icon. r=Jamie https://hg.mozilla.org/integration/autoland/rev/e8aef1c9d20c Part 2: Update the test browser_toolbarKeyNav.js. r=johannh https://hg.mozilla.org/integration/autoland/rev/c641e5c66a71 Part 3: Update more tests. r=johannh
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
QA Whiteboard: [qa-70b-p2]

I have reproduced this bug with Nightly 68.0a1 (2019-05-19) on windows 10, 64 bit!

The fix is now verified on Latest beta 70.0b7

Build ID : 20190916074538
User Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0

[bugday-20190918]

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: