Skip to content

Commit ffc2144

Browse files
ElormCochDevtools-frontend LUCI CQ
authored andcommitted
Fix screen reader accessibility for occurrences buttons in css overview
Bug: 384276596 Change-Id: Ic04e6e5f69a321a7dee3e241595131a349c62321 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6096005 Reviewed-by: Alex Rudenko <[email protected]> Commit-Queue: Sylvester Elorm Coch <[email protected]>
1 parent 5ab7bc1 commit ffc2144

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

front_end/panels/css_overview/CSSOverviewCompletedView.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,15 +702,16 @@ export class CSSOverviewCompletedView extends UI.Widget.VBox {
702702

703703
const total = values.reduce((prev, curr) => prev + curr[1].length, 0);
704704

705-
return UI.Fragment.Fragment.build`<ul>
705+
return UI.Fragment.Fragment.build`<ul aria-label="${type}">
706706
${values.map(([title, nodes]) => {
707707
const width = 100 * nodes.length / total;
708708
const itemLabel = i18nString(UIStrings.nOccurrences, {n: nodes.length});
709709
710710
return UI.Fragment.Fragment.build`<li>
711711
<div class="title">${title}</div>
712712
<button data-type="${type}" data-path="${path}" data-${dataLabel}="${title}"
713-
jslog="${VisualLogging.action().track({click: true}).context(`css-overview.${type}`)}">
713+
jslog="${VisualLogging.action().track({click: true}).context(`css-overview.${type}`)}"
714+
aria-label="${title}: ${itemLabel}">
714715
<div class="details">${itemLabel}</div>
715716
<div class="bar-container">
716717
<div class="bar" style="width: ${width}%;"></div>

0 commit comments

Comments
 (0)