-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
report: add aria-labels to tools button and metric toggle #9201
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,7 @@ | |
<!-- Lighthouse metrics toggle --> | ||
<template id="tmpl-lh-metrics-toggle"> | ||
<div class="lh-metrics-toggle"> | ||
<input class="lh-metrics-toggle__input" type="checkbox" name="toggle-metric-descriptions"> | ||
<input class="lh-metrics-toggle__input" type="checkbox" id="toggle-metric-descriptions" aria-label="Toggle the display of metric descriptions"> | ||
<label class="lh-metrics-toggle__label" for="toggle-metric-descriptions"> | ||
<div class="lh-metrics-toggle__icon lh-metrics-toggle__icon--less" aria-hidden="true"> | ||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"> | ||
|
@@ -366,7 +366,7 @@ | |
<a href="" class="lh-topbar__url" target="_blank" rel="noopener"></a> | ||
|
||
<div class="lh-tools"> | ||
<button class="report-icon report-icon--share lh-tools__button" title="Export report"> | ||
<button class="report-icon report-icon--share lh-tools__button" title="Tools menu" aria-label="Toggle report tools menu"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. at what point does i18n creep into here? :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
😬 (probably should have a while ago) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this be the point: #9166 |
||
<svg width="100%" height="100%" viewBox="0 0 24 24"> | ||
<path d="M0 0h24v24H0z" fill="none"/> | ||
<path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prepend()
made the screen reader version of the category really confusing.Maybe prepending was done because the code reads at first glance like the toggle needs to be prepended to come before the rendered audits, but
renderAuditGroup()
only renders the container and the group header, not the audits themselves, so the toggle should be the last child ofmetricAuditsEl
at this point....or maybe the code just changed over time and this was a holdover of a different version :) Moved the
metricAudits
filter statement to try to make the order of things clearer, regardless.