Skip to content

Commit

Permalink
Update copy, add aditional row with 'legible text'.
Browse files Browse the repository at this point in the history
  • Loading branch information
kdzwinel committed Dec 6, 2017
1 parent eff057b commit e298c13
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions lighthouse-core/audits/seo/font-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class FontSize extends Audit {
const headings = [
{key: 'source', itemType: 'url', text: 'Source'},
{key: 'selector', itemType: 'code', text: 'Selector'},
{key: 'coverage', itemType: 'text', text: 'Coverage'},
{key: 'coverage', itemType: 'text', text: '% of Page Text'},
{key: 'fontSize', itemType: 'text', text: 'Font Size'},
];

Expand All @@ -205,13 +205,22 @@ class FontSize extends Audit {
(failingTextLength - analyzedFailingTextLength) / visitedTextLength * 100;

tableData.push({
source: 'Other',
source: 'Additional unanalyzed small text',
selector: null,
coverage: `${percentageOfUnanalyzedFailingText.toFixed(2)}%`,
fontSize: '< 16px',
});
}

if (percentageOfPassingText > 0) {
tableData.push({
source: 'Legible text',
selector: null,
coverage: `${percentageOfPassingText.toFixed(2)}%`,
fontSize: '≥ 16px',
});
}

const details = Audit.makeTableDetails(headings, tableData);
const passed = percentageOfPassingText >= MINIMAL_PERCENTAGE_OF_LEGIBLE_TEXT;
let debugString = null;
Expand Down

0 comments on commit e298c13

Please sign in to comment.