Commit 2273724d authored by Hector Carmona's avatar Hector Carmona Committed by Commit Bot

WebUI - Error Console: Improve A11y by announcing expanded status.

Bug: 814117
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Iac4324eb5c8790edf9affec485f5a3a91c985908
Reviewed-on: https://chromium-review.googlesource.com/1068113
Commit-Queue: Hector Carmona <hcarmona@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560865}
parent 0b9615b9
......@@ -191,9 +191,10 @@
<div class="item-container">
<div class$="error-item
[[computeErrorClass_(item, selectedEntry_)]]">
<div actionable class=" start" on-click="onErrorItemAction_"
<div actionable class="start" on-click="onErrorItemAction_"
on-keydown="onErrorItemAction_" tabindex="0"
role="button">
role="button" aria-expanded$="[[isAriaExpanded_(
index, selectedEntry_)]]">
<iron-icon icon$="[[computeErrorIcon_(item)]]"
title$="[[computeErrorTypeLabel_(item)]]">
</iron-icon>
......
......@@ -254,11 +254,6 @@ cr.define('extensions', function() {
return description;
},
/** @private */
getExpandedClass_: function() {
return this.stackTraceExpanded_ ? 'expanded' : '';
},
/**
* @param {chrome.developerPrivate.StackFrame} frame
* @return {string}
......@@ -390,6 +385,16 @@ cr.define('extensions', function() {
return index == this.selectedEntry_;
},
/**
* @param {number} index
* @return {string} The aria-expanded value as a string.
* @private
*/
isAriaExpanded_: function(index) {
return this.isOpened_(index).toString();
},
/**
* @param {!{type: string, code: string, model: !{index: number}}} e
* @private
......
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