Commit 4e63842d authored by Michael Irani's avatar Michael Irani Committed by Commit Bot

ChromeVox focus not properly shown when navigating: Apps page

If you navigate to "Apps" page and then to an application,
and then hit the back button the focus does not highlight the
application that was chosen when in ChromeVox mode.

Steps (in ChromeVox mode):
1. Apps
2. Chrome
3. Back button

Bug: 1029954
Test: Manual
Change-Id: I8c54f7fb88379392ebfc373f209b9386a84a345e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2493826
Commit-Queue: Michael Irani <michaelirani@chromium.org>
Auto-Submit: Michael Irani <michaelirani@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820490}
parent 21560195
......@@ -62,6 +62,7 @@ js_library("app_management_page") {
":main_view",
":store",
":store_client",
"//ui/webui/resources/js/cr/ui:focus_without_ink",
]
}
......
......@@ -5,6 +5,7 @@
<link rel="import" href="store_client.html">
<link rel="import" href="chrome://resources/cr_elements/cr_icon_button/cr_icon_button.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<link rel="import" href="chrome://resources/html/cr/ui/focus_without_ink.html">
<dom-module id="app-management-main-view">
<template>
......@@ -23,6 +24,7 @@
<template is="dom-repeat" items="[[appList_]]" as="app">
<app-management-app-item app="[[app]]">
<cr-icon-button slot="right-content"
id$="app-subpage-button-[[app.id]]"
class="subpage-arrow app-management-item-arrow"
aria-label$="[[app.title]]"
role="link"
......
......@@ -7,6 +7,7 @@ Polymer({
behaviors: [
app_management.StoreClient,
settings.RouteObserverBehavior,
],
properties: {
......@@ -40,6 +41,25 @@ Polymer({
this.updateFromStore();
},
/**
* @param {!settings.Route} route
* @param {!settings.Route} oldRoute
*/
currentRouteChanged(route, oldRoute) {
if (route === settings.routes.APP_MANAGEMENT) {
const appId = app_management.Store.getInstance().data.selectedAppId;
// Expect this to be false the first time the "Manage your apps" page
// is requested as no app has been selected yet.
if (appId) {
const button = this.$$(`#app-subpage-button-${appId}`);
if (button) {
cr.ui.focusWithoutInk(button);
}
}
}
},
/**
* @private
* @param {Array<App>} appList
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment