Repository navigation
Pass Lighthouse's table-header and target-size audits - #302
Merged
Merged
Conversation
Lighthouse's accessibility category still failed two audits on master. On a phone, target-size cost the 1vN and compare-sample result pages 4 points: an id or family cell holds the value and the icon that filters by it, and a narrow column wrapped them onto two 21.6px lines, closer than the 24px targets WCAG 2.5.8 asks for. td-has-header failed on the index and the compare-all and compare-family results, where a header cell had no text: an empty <th> over a buttons column, or an icon whose title is a tooltip rather than header text. Every such header gets a visually-hidden label and its icon aria-hidden; icons left open inside a header are closed, since an open aria-hidden <i> would hide the label too. The cross-compare matrix had a header row of <td>; it is <th> at normal weight and looks the same. Id and family cells keep their content on one line, so a family name with spaces takes the column's width instead of wrapping. testAccessibility's page check now reports a header without text, a table without a header cell, and a value and its filter link that may wrap; testTableLayout pins the nowrap rule.
This was referenced Oct 20, 2026
Open
Open
This was referenced Oct 24, 2026
danielplohmann
added a commit
that referenced
this pull request
Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lighthouse's accessibility category still fails two audits on master (6564602). On a phone,
target-sizetakes the 1vN result pages to 96: a result row's id and family cells hold a link and, next to it, the icon that filters by that value, and a narrow column wraps the two onto 21.6px lines, closer together than the 24px targets WCAG 2.5.8 asks for.td-has-headerfails on the index, the 1vN results and the cross-compare result, because some tables have header cells without text (an empty<th>over a buttons column, or only an icon whosetitleis a tooltip rather than header text) or, in the cross-compare matrix, no header cells at all. This gives every such header text for assistive technology and keeps a value next to its filter icon, without changing how a page looks at desktop width.Change.
visually-hiddenlabel, and their icon getsaria-hidden="true"; the icon'stitlestays as the hover tooltip.mcritweb/templates/table/job_row.html:213,:259,table/family_row.html:85,table/function_row.html:61,table/sample_row.html:110,cross_compare.html:134,unique_blocks.html:106, five inusers.html); the info column says "Details" (table/sample_row.html:107) and the badge column "Match" (table/row_decoration.html:44).table/sample_row.html:76,table/function_row.html:29-37,table/family_row.html:65). The family column of the result tables (result_compare_all.html:82,:164,result_compare_family.html:55,result_compare_sample.html:40,result_compare_vs.html:33) says "Family", because its cells show names, and its tooltip now says the same.aria-hiddenon an open<i>would hide the label after it too (cross_compare.html:127,unique_blocks.html:99; and the four headers atresult_compare_function.html:55-65, which have text and only needed the markup fixed).<td>. It is<th scope="col">at normal weight now, so it looks as before (result_cross.html:7-14).table.table td.id, table.table td.familykeep their content on one line (mcritweb/static/style.css:328), and the five family cells that carry a filter icon getclass="family"(result_compare_all.html:116,:198,result_compare_family.html:89,result_compare_sample.html:74,result_compare_vs.html:67). The rule reaches everytd.idin an application table, including link hunt and unique blocks, whose id cells hold one short token and did not change. A family name with spaces no longer wraps in those cells; the column takes its width instead.Verification. On the testbed, master (6564602) and this branch as side instances against the live backend, logged in, otherwise GET only.
Lighthouse 12.8.2, accessibility, with its default mobile emulation, one run per page on each side:
td-has-headerfails6ab3b4455ccfc2538ffea9b6)target-size(11 links),td-has-header?famid=3,?samid=10,?funid=3576ab3e95a3b24190e88fedbb4)target-size(15 links),td-has-header6ab3b44578ce0e8f2efea9c7)6ab3bc93e867efea4ffec3c5)td-has-headerfails6ab3b4465ccfc2538ffea9c4), link hunt, function vs function, function pageOn the branch no audit fails on any of these pages.
Screenshots at 1440, 1024, 768 and 390px of both cross-compare results, the 1vN result with
?famid=,?samid=and?funid=, the 1v1 result, unique blocks, and the samples, families and functions tables are pixel-identical to master at 1440px. At 768 and 390px the cells that wrapped the filter icon onto a second line no longer do (5 to 0 id cells on the 1vN page); the family column widens from 138 to 174px and the sample id column from 58 to 68px, so filename and version wrap more instead.scrollWidthis master's on every page and width checked. The index, jobs list and users page were checked at 1440px only.No script reads header text: every
cellIndex,textContentandth.idlookup instatic/and the templates targets body cells, and the cross-compare lazy panes treat<th>and<td>alike.Tests.
tests/testAccessibility.py's page check now reports a<th>without text (a hidden span counts; an icon'stitleand text insidearia-hiddendo not), a table of three rows and columns without any header cell, and a cell holding a link and its filter link that is not one of the cells kept on one line. Its self-test shows each is caught. Four pages join the list so every edited template is rendered:/explore/search?query=1(which adds the "Match" column, now asserted), and one family's, one sample's and one function's matches.tests/testTableLayout.pypins thenowraprule.class="family"fails the 1vN pages, and dropping thenowraprule failstestTableLayout. The header changes inresult_compare_function.htmlonly close tags, and no page test depends on them.ruff check .clean.Relation to open PRs. A trial merge (
git merge-tree) with each open PR head:table/match_row.htmland conflicts here; whichever merges second carries the hidden labels andclass="family"into the macro.body's 900px minimum width, so on a phone the result tables are as wide as the screen and their id and family cells wrap on more pages: alone, it failstarget-sizeon a family's matches (?famid=) too. This branch keeps those cells on one line, and a build with both scores 100 there.<i>in these headers and conflicts on those lines; the resolution keeps this branch's side, which also hides the icon and adds the label. Since 137b0b5 it also adds a check to the same self-test intests/testAccessibility.py, and since f5bab66 a rule aftertable.table td.buttonsinstyle.css, where this branch adds itsnowraprule; the resolution keeps both checks and both rules. Surface, rotate and optionally retire the pre-1.5.0 API tokens (#250) #254 is stacked on Establish UI/UX parity and design consistency across views #253.result_cross.html: it gives the cross-compare header rowvar(--text-strong), which whichever lands second keeps alongside the<th>.