Repository navigation
Conversation
The controls that open these dialogs were anchors without an href, role="button" and data-bs-toggle="modal". An anchor without an href is not focusable, so Tab passed over every one of them and a keyboard user could not edit or delete a family or sample, rename a function or read its API usage. They are buttons now, with the same ids and data-bs-* attributes the show.bs.modal handlers read, and the function page's "Compare with function" menu entry, a link to "#", is a button as well. The disabled rename stays focusable through aria-disabled.
Fifteen links that go to another page (a row's export, unique blocks, compare and Show result buttons, the function page's sample, family and graph buttons) carried role="button", so a screen reader announced a button and its user pressed Space, which follows no link. The role is gone. The navbar's Explore, Analyze, Data and account menus and the jobs page's category menus were the opposite: links to "#" that open a menu, on which Space did nothing. They are buttons now, which Bootstrap opens the same way, and navbar.css keeps them looking like the links they replace. For an account waiting for a role the three menus carried `disabled`, which an anchor ignores, so assistive technology read three working buttons; on a button it disables them.
Bootstrap's disabled class greys a control out and stops the pointer; nothing else. The pager's First and Previous on the first page, and Next and Last on the last, kept a live href (Previous pointed at page 0), so they were tab stops that reloaded the page, and a screen reader read them as working links. They render without an href, as role="link" with aria-disabled, like the cursor pager's Last page already did. That Last page put its tab stop on the span around it, which had no role, and its reason only in a title Bootstrap moves into a tooltip. The link is the tab stop now and its name gives the reason; focus moving into the span still shows the tooltip. The jobs page's greyed-out category entries were links Tab stopped on, and the YARA tab of a report without a rule said nothing; both carry aria-disabled.
sortable_header_col rendered the header as `th role="button" tabindex="0"` with the sort in an inline onclick. The role replaced the column header, so a screen reader announced no column for the cells below a sortable header, and no header anywhere carried aria-sort. It is a plain `th scope="col"` now, with aria-sort on the column the table is sorted by, holding a link that loads the table sorted by it; the href keeps it middle-clickable and an onclick still adds the other tables' state where a page needs it. A header given no pagination is no longer a click that reloads the page. page_loading.js watches the sort links as it watches the pager's. The Unique Blocks statistics sort in the page and their headers took a click and nothing else. The label is a button inside the header now, and the script sets aria-sort where it sets the sort direction. style.css keeps both looking like the headers they were.
The select loaded the page from its onchange. A select changes its value at every press of an arrow key, so a keyboard user stepping from 25 to 100 got the page loaded at 50, with focus back at the top. A change made with a key now waits for Enter or for focus to leave the select; one made with the pointer, or a touch screen's picker, still loads at once. The handlers are in pagination_js(), next to pagination_js_helper. The search page rendered three of these selects without pagination_js(), so their onchange threw and they did nothing; it includes it now.
Bootstrap 5.0.2 focuses a dialog's own box when it opens, so the `autofocus` field of the function page's compare and rename dialogs never got the cursor. On close it hands focus back only to a data-bs-toggle opener that is still visible: the jobs page's delete dialog, which a script opens, and the compare dialog, opened from a menu entry the menu hides again, left focus on <body>, and a keyboard user started over at the top of the page. static/keyboard.js, queued from base.html for every page, listens to the dialogs' events: on shown it focuses an [autofocus] field, and on hidden, when focus has gone nowhere else, it returns to the element that opened the dialog, or to the toggle of the menu that held it.
Bootstrap 5.0.2's tab plugin shows a tab on a click and does nothing else (the keyboard model came in 5.3): every tab was a tab stop of its own and the arrow keys did nothing. static/keyboard.js gives every role="tablist" one tab stop, its selected tab, kept in step on shown.bs.tab, and moves between tabs with Left, Right, Home and End, past a disabled tab. A tab is shown as focus reaches it, except in the cross compare result's list, marked data-tab-activation="manual": each of its tabs builds a matrix the first time it is shown, so there Enter or Space shows it. result_unique_blocks.html wrote aria-selected="true" on the statistics tab and "false" on the other two whichever was active, so ?tab=blocks showed the blocks and announced the statistics as selected. It follows active_tab now, as users.html does.
Compare 1vsN, Compare 1vs1, Cross Compare and Unique Blocks picked a sample when its row was clicked, and only then: a row had no tab stop and no key, so a keyboard user could compare only the sample 1vsN picks by default and could not fill a cross compare or Unique Blocks at all, except from a hash list. The state was a background tint and nothing else, about 1.1:1 against the rows around it in the light theme and lost entirely in forced colours. Each picker row now leads with its control, from one pick_cell macro: a radio button, one group per table, on the two compare pages, and a checkbox on the other two, ticked and disabled for a sample the page already holds and takes back with the x of its own table. The page scripts keep the control, the tint and their `selected` lists in step, whether the row or the control is clicked or a key changes it. In forced colours a picked row is framed in Highlight.
A click on a row was the only way from the sample, family, function and job lists, the search results and a cross compare result into what a row names: the handlers sat on tr and td, which no key reaches, and a queued or running job's page had no link anywhere. The id cell of each row holds a real link now, the same format_*_id links the function rows' family and sample columns and the home page's sample list already use, and the job number links to the job's page. The click handlers stay as a pointer's shortcut and leave any link or button in the row to itself, so a click on the id is not handled twice. On a cross compare result the row's id was a td.clickable that read the job id out of a hidden cell; it is the row's header now, with a link to the row sample's report, and the hidden cell and its delegated handler are gone. A picker's row keeps its plain id, since a click there picks. A row-header link gets the same 24px minimum width as the table links in cells, for WCAG 2.5.8.
The column lists under Settings (SortableJS) and a cross compare result's sample order (jQuery UI) were ordered by dragging and nothing else. Their items had no tab stop and no key, and jQuery UI's drag binds the mouse only, so a keyboard user could not choose the columns of any of the seven tables and nobody on a touch screen could set a custom sample order. Every item now has Move up and Move down buttons, and a column a third that moves it to the other list of its table. static/reorder_list.js, queued by both pages, moves the item, keeps focus on the button pressed and says in a polite status region where the item went; it keeps the third button's name and arrow right after a drag between lists too, from SortableJS's add event. The save and the "Change order" button read the item's data attribute rather than its text, which now includes the buttons. Dragging is unchanged.
Each score of the matrix was an empty span coloured by score_to_color: its number was in a data-hint tooltip shown on hover only, a pair with matches opened its report from an onclick on the span, and the cells had no row or column headers, so a screen reader read bare cells and a keyboard reached none of them. Colour was the only encoding a pointer did not have to ask for, and the page named no scale. A pair with matches is now a link to that report and a pair without one a role="img" span, either named by its score in aria-label. The table has a caption, the row's id cell is its row header, and the second header row has a header for every column, showing every fifth sample id as before and the rest visually hidden. To keep the matrix from adding up to N*N tab stops it is one, its first score: links carry tabindex="-1", and the arrow keys, Home and End move between scores and the tab stop with them. Focus puts the pair's samples into the tooltip as hover does, so a keyboard user sees the same text. A pane filled on its tab's first show clones all of this and writes its own score names and tab stop. A key above the tabs shows which range of scores each colour stands for, with the matrix's own .score-swatch class so the dark theme dims it alike. Every cell is still one element, as before.
The greyed-out entries of the jobs page's category menus lost their href when they were marked aria-disabled, and the menu is how a maintenance job the server page started is found by its type while the queue holds none of it (testMaintenanceJobs). They keep the href now, as Bootstrap's own disabled menu entries do, with tabindex="-1" beside aria-disabled, so Tab still passes them and a screen reader still hears them as unavailable.
The column test now saves and reads the lists back from the page the save loads, so it pins the order stored rather than the order on screen. The matrix test read a focused score's tooltip in the frame focus arrived, before hint.css's transition had made it visible, and failed under load; it waits for it.
#336 names each pager after its table: "Last page of functions, ...", "Rows per page of samples". #335's tests looked for the cursor pager's "Last page," and for select[aria-label='Rows per page'] exactly, so the disabled-pager check and five page-size tests failed. The pager check allows an " of <table>" before the comma, and the browser tests find the select by the start of its name.
The per-column move buttons wrote three buttons and their icons into each of the 67 items of /settings, taking the page from about 42 KB to 100 KB. The page carries the API token, so it is sent uncompressed against BREACH, and the extra weight cost a point of mobile Lighthouse performance. An item is now its name alone. static/reorder_list.js, which runs after the first paint, adds each item's buttons with the same names, titles and icons, and the across button's name still follows a drag. The stylesheet keeps room at the end of every item for them (three buttons in a column list, two in the cross compare order), so adding them moves nothing and the name never runs under them. Nothing orders without the script, so nothing is lost without it. /settings is now about 46 KB. The tests check that the pages carry no buttons, that the items measure the same with and without them at 1280 and 390 px, that no name runs under them, and that the lists shift by 0.
Without hard links the key was written into a file created with O_EXCL, empty until filled. A worker that opened that file in the gap could replace it and find the creator's key still written into the file it had displaced; a third worker that had opened the displaced file before the replacement then read the loser's key and used it, while everyone else used the winner's. One round in about 1600 ended that way. The staged key, complete and private from mkstemp, is now renamed into place under a lock on the instance folder, looking at the key file again once the lock is held. No key file is opened for writing any more, and none is ever visible unfinished. The test that pinned the old create-then-lock order is replaced by two that pin the new one.
Since the script adds the move buttons, they sit out of the flow, so an item no longer grows to hold them. The cross compare order's items are a line of small text, 21.6px, and each item's 24px buttons ran 2.4px over the next item's: they covered each other and Lighthouse's target-size audit failed the result page (accessibility 97). An item is now at least 24px tall, which the stylesheet sets from the first paint, so adding the buttons still moves nothing.
The check that the move buttons stay out of /settings used a budget for the whole page, which other forms on the page also grow, so it failed for reasons that have nothing to do with the buttons. It now bounds the column list per item, which is what the buttons inflated: about 990 bytes an item with them, under 200 without.
The page-size select carried four handler attributes and its page an inline script of four functions, so that a key held on it does not load the page at every size it passes. The cross compare result carried the matrix's arrow-key and tooltip handlers as an inline script. Both came with every copy of the page and are only used once it is painted. The select now says where it loads and with which parameter, in data-pager-* attributes, and static/keyboard.js does the waiting for Enter or for focus to leave. The matrix's handlers are static/cross_matrix.js, queued by the result page. A size chosen before keyboard.js has run is applied when it has, on a page the browser opened fresh; one restored on reload or going back is the browser's own and is left alone.
The pickers, the cross compare result and the table rows explained their new handlers in // comments inside inline scripts, 29 lines that went to the browser with every copy of those pages. A Jinja comment says the same to whoever reads the template and is dropped on rendering. A ratchet test keeps the count: no template may send more comment lines in its inline scripts than it did before, which is also what a template that carried none may not start to do.
The dialogs', tab lists' and page size select's key handling was keyboard.js, queued on every page. Each file the queue adds is one more ordered request before the page's scripts have run, and in Lighthouse's mobile run it costs blocking time however little it does. On the build of all the pull requests the index page took 35 to 45 ms against the base's 8 to 15, and /data/export 50 to 57 ms against 5 to 12. With keyboard.js, icon_titles.js and hints.js folded into files the base already queues, the index page is at 10 ms against 15 and /data/export at 14 ms against 5, all 100. The code goes at the end of post_action.js, which every page queues already, in its own function with its own "use strict". It now runs just before page_loading.js instead of just after it, so the size chosen before the queue had run, which it applies on a fresh page, waits in whenReady(): the load shows the spinner through page_loading.js. keyboard.js is gone, with its later() line, and the comments and the browser test that held it back name post_action.js.
This was referenced Oct 26, 2026
Open
The colour key above the cross compare tabs is eleven empty inline spans, and an empty inline span is 0px wide: the key showed its ranges and no colours. Each swatch is now a 1em square with a frame in the swatch border colour. In forced colours the swatches keep their colours, since the scale is the information and the labels name every step, and take the text colour for their frame. The labels no longer break between a swatch and its range.
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.
Based on
ref/integrate-all-20261025, the build of all open PRs (#316's comment has the order), so the diff here is this change alone. One of a set of PRs from a review of the front end against the modern-web-guidance accessibility and interaction guides; the others are #328 and #330 to #334, plus the semantics and layout PRs. Checked in Chromium.Dialogs
<a role="button">with nohref, so the keyboard could not reach them. They are<button>s now, and the disabled rename keepsaria-disabled.autofocusin a modal and drops focus to<body>on close. New code at the end ofstatic/post_action.js(every page; it wasstatic/keyboard.jsuntil 222fe08) fixes both:[autofocus]field when it opens;Links, buttons and disabled controls (011c419, 005f615, fa991dc)
role="button"that hid the fact they navigate.<button>s, so Space opens them.href;aria-disabledandtabindex="-1", keeping thehreftestMaintenanceJobsrelies on;Tables
<th role="button">, which replaced the column-header role, and no header carriedaria-sort.thwitharia-sort, and sort through a link. A sort loads a new URL, as the pager next to it does (AGENTS.md: "an ordinary link click"), so middle-click works too.<button>.page_loading.jswatchesa.table-sort.format_*_idmacros, and a job number links to its job page.search.htmlnow includespagination_js(): its three page-size selects threw on change and did nothing.data-pager-*attributes, andpost_action.jsdoes the waiting for Enter or for focus to leave.static/cross_matrix.js, queued by the result page.post_action.jshas run is applied when it has, on a page the browser opened fresh; one restored on reload or going back is the browser's own and is left alone.Tab lists (3b5eb6f). Bootstrap 5.0.2's tab plugin has no arrow keys; they came in 5.3. Every tab list now has:
?tab=, the opened tab markedaria-selected.Sample pickers (700c9e6). The four pickers selected by a click on the row and showed the choice only by a background tint.
Ordering (38c8625, 4f24bd7). The column order on
/settingsand the sample order on cross compare were drag-only, with no keyboard and, on cross compare, no touch.static/reorder_list.jsadds move-up and move-down buttons, plus move-to-the-other-list on settings./settings, which took the page from about 42 KB to 100 KB. The page carries the API token, so it is sent uncompressed against BREACH, and the extra weight cost a point of mobile Lighthouse performance.reorder_list.js, which runs after the first paint, adds each item's buttons with the same names, titles and icons, and the across button's name still follows a drag./settingsis about 46 KB./settingsused a budget for the whole page, which other forms on it also grow. It bounds the column list per item instead: about 990 bytes an item with the buttons, under 200 without.The cross-compare matrix (bedc2f9). Each score was an unnamed colour swatch, with its value in a hover tooltip and its drill-down on a mouse click.
role="img"span, named by its score in both cases.td.clickablehandler is gone, and AGENTS.md says so (16fe250).Measured on the corpus job (5×5), 8 alternating runs, desktop Chromium: no blocking time either side. Style went 9.2 → 7.8 ms median, layout 25.8 → 22.0 ms.
On a 100×100 matrix built from fabricated samples, measured on a loaded machine (load average 12-16 on 4 cores): DOM nodes went 117,309 → 118,392. The timings swung too widely to read, from load TBT 190 → 660 ms median to tab-switch TBT 2503 → 2428 ms. A controlled test puts
<a>cells about 10-15% above the old spans in first style time. #334's idle-tooltip rule halves this page's layout. Both are measured together on a quiet machine before merging, and the numbers go into the merge-order comment on #316.Since review was requested.
" of <table>"before the comma, and the browser tests find the page-size select by the start of its name.//comments inside inline scripts, 29 lines that went to the browser with every copy of those pages. They are Jinja comments now, which are dropped on rendering.testInlineScriptComments.pykeeps the count: no template may send more comment lines in its inline scripts than it did before.keyboard.js, a file of its own queued on every page. Every file the queue holds costs blocking time in Lighthouse's mobile run however little it does: on the build of all PRs the index page took 35 to 45 ms against the base's 8 to 15, and 10 ms against 15 once the every-page scripts were folded into files the base already queues (numbers in Make tooltips reachable and keep them in the window, report copies in a status message, and keep a stray drop off the page #334). The code now endspost_action.jsandkeyboard.jsis gone. It runs just beforepage_loading.jsinstead of just after it, so the step that applies a page size chosen before the queue had run waits inwhenReady(); without that it would skip the spinner.Tests. Each fix has a test that fails on the base:
tests/testKeyboardAccess.py(CI) andtests/testKeyboardAccessBrowser.py(Chromium; skips in CI without playwright) are new; 1965087, f4a99c7, a175bb7 and a92dfe0 extend them.keyboard.jshas no file of its own: the page does not queue it, the file is gone andpost_action.jsholds the tab code. The browser test that holds the script back now holdspost_action.js.tests/testInlineScriptComments.pyis new (07dff03).tests/testSecretKeyRace.pyreplaces the test that pinned the old create-then-lock order with two that pin the new one (8c8f3fc).tests/testPagination.pyis extended by a92dfe0.Lighthouse. Accessibility, Best Practices and SEO are 100 on the 18 touched pages, mobile and desktop. Desktop Performance is 100, apart from one page at 98. Mobile was measured under load; in alternating runs on 5 pages the base scored 86-100 and this branch 97-100.
Merge notes.
pagination_widget.html,base.html, the row templates,single_function.htmlandjobs.html; keep both sides.tr.row-selected, tr.row-pendingoutline; keep one copy.reorder_list.json two pages andcross_matrix.json the cross compare result. The keyboard code is inpost_action.js, which every page queues already.