Skip to content

Commit

Permalink
report: make metric filter accessible (#12552)
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed May 25, 2021
1 parent 3d090b5 commit 836fd19
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Expand Up @@ -311,17 +311,17 @@ class PerformanceCategoryRenderer extends CategoryRenderer {
]);
for (const metric of filterChoices) {
const elemId = `metric-${metric.acronym}`;
const radioEl = this.dom.createChildOf(metricFilterEl, 'input', 'lh-metricfilter__radio', {
type: 'radio',
name: 'metricsfilter',
id: elemId,
});

const labelEl = this.dom.createChildOf(metricFilterEl, 'label', 'lh-metricfilter__label', {
for: elemId,
title: metric.result && metric.result.title,
});
labelEl.textContent = metric.acronym || metric.id;
const radioEl = this.dom.createChildOf(labelEl, 'input', 'lh-metricfilter__radio', {
type: 'radio',
name: 'metricsfilter',
id: elemId,
hidden: 'true',
});

if (metric.acronym === 'All') {
radioEl.checked = true;
Expand Down
8 changes: 8 additions & 0 deletions lighthouse-core/report/html/report-styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 836fd19

Please sign in to comment.