GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — docs: give every table header cell text and fail lint on empty ones by nickvigilante · Pull Request #30879 · coder/coder Conversation
|
Docs previewCheck off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
errcheck and revive flagged the discarded ast.Walk and strings.Builder errors in the table check. Neither visitor can fail, so walk the tree with a small pre-order helper instead. Assisted-by: AI
The main merge brought in the new secret list page, generated before the Property | Value header, so the merge left its --column table empty. Assisted-by: AI
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The approach is right: fixing the generator and gating the result in docshtmlcheck, which already parses every page. I'm commenting rather than approving because of two issues, both inline. The rewritten port-forwarding table gives screen readers contradictory headers, and the new check misses in Markdown cells.
What I verified:
docshtmlcheck reports nothing on this branch and 1,559 empty header cells on the merge base (the body says 1,555). A test merge with current main is also clean, so no newly added CLI page breaks the gate.Property | Value back to | | | and collapsing padding, every file is identical to main, so content is unchanged. The body could mention that body rows are re-padded too, not just header rows.scanNode refactor: I built main's checker and this one and ran both over all of docs/ plus a file of HTML errors. The non-table output is byte-identical.go test, go vet and golangci-lint on scripts/docshtmlcheck and scripts/clidocgen all pass.make gen caveat. The two failures are unrelated:
userengagementchart--loaded, the same as the last four main runs. This PR touches no site/ files.One thing to acknowledge in the PR: every option on 115 pages now shows a visible Property | Value header row. That's a visual change on the docs site.
Generated by Coder Agents on behalf of @Jesswinters.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…le headers goldmark keeps an entity such as as literal source text until it renders, so a pipe header cell or the Markdown between <th> blocks holding only looked non-empty and passed, while axe still reports it because U+00A0 trims to nothing. Text nodes are now run through UnescapeString, except inside a code span, where the entity renders literally and is real text. axe's has-visible-text also counts an image's alt text, so an <img alt> in a <th> or a pipe header cell, and an autolink or code block between <th> blocks, no longer read as empty. A table nested inside a <th> still does, and the README lists that under Limitations. The README intro and "How it works" now describe the table check too. Assisted-by: AI
…I notes to the template run derived the HTML count as reportFindings' total minus the table findings, which only worked because reportFindings lumped table findings in with HTML ones, and its doc comment no longer said what it returned. reportFindings now returns a count per kind. Sorting the merged findings by line also moved line-0 stale-allowlist findings ahead of the content findings, where they used to come last; they sort last again. On a CLI reference page the generated-page note sent authors to codersdk and swagger, but a CLI page comes from --help text and scripts/clidocgen/command.tpl, where an empty option-table header would be fixed. The note now names those for CLI pages. Assisted-by: AI
… table Without a scope, a <th> in a row with no data cells is a column header, so From user and From workspace, which span the first three columns, became column headers for the body's label columns alongside To user, To workspace and To app. A screen reader on "Alice" announced "To user, From workspace, From user", which contradicts itself. The From cells now have scope="row" and the other header-row cells scope="col", so each label stays on its own header row. The body's user, workspace and app labels become row headers, so each check or cross mark is announced with both its destination and its origin. The third header row puts App A to App D beside the To labels with nothing saying they are the origin apps, so a caption states that columns are the origin and rows the destination, matching the From and To labels the table already uses. Assisted-by: AI
…tion A style guide section enforced by the docs HTML checker had no way to say so: styleclaims only read markdownlint, MD rules, Vale rules and scripts/check_emdash.sh as tool citations, so a footer naming scripts/docshtmlcheck classified as documentation-only and the coverage table could not count it. Assisted-by: AI
The checks table row for empty-table-header pointed at no rule section, because the formatting guide's Tables section was documentation-only, and the counts below the table still said 9 checked rules. Tables now states the header-text rule with an enforcement footer citing scripts/docshtmlcheck, and the counts move to 10 checked and 45 documentation-only. The row's Tool column now names make lint/docs-html, matching the make lint/emdash row, the paragraph on which checks fail the build includes it, and the Makefile comment and echo for lint/docs-html mention table headers. Assisted-by: AI
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Re-reviewed at 2871f89. Every point from my first review is fixed, and I checked each by running it. I'd approve the code. I'm commenting rather than approving only because the branch now conflicts with main, so no ci.yaml job (gen, lint, lint-docs, Storybook) has run on this head. After a rebase, main also has a page that would fail the new check (details below).
Fixed:
| |,  ,   and <th> + between blocks are now reported. A code-span ` `, \ and &nbsp; are correctly not reported.. alt="", alt=" ", alt=" " and a missing alt are still reported as empty.<th> blocks. An autolink or fenced code between <th> blocks counts as text. The nested-table case is documented under Limitations.issueCounts reports per kind, stale-allowlist findings sort last, and the note on CLI pages now points at scripts/clidocgen/command.tpl.getHeaders, "Alice" now gets only "To user". The ✅/❌ cells get both column and row headers. <th scope="row"> in thead is valid, and it's what stops the "From" cells being treated as column headers. axe 4.13 passes empty-table-header, td-has-header, th-has-data-cells, scope-attr-valid and td-headers-attr. The caption matches the layout.styleclaims change is needed (without it, the new footer wouldn't count as a tool citation), it mirrors how check_emdash.sh is handled, and it has tests.Local runs: go test, go vet and golangci-lint on docshtmlcheck, clidocgen and styleclaims; go run ./scripts/docshtmlcheck (exit 0); go run ./scripts/styleclaims (exit 0); Vale, markdownlint and the table formatter on the changed docs. All clean. I also ran 32 adversarial inputs against the checker, and each matched axe or the documented limits.
Before merge (rebase):
docs/.style/style-guide/README.md: 88 rules, the coverage table, and the line 92 sentence. I resolved the conflict in a scratch copy, and these values pass styleclaims:
13 | 3 | 0 | 10, and Total is 88 | 10 | 34 | 44.main added docs/reference/cli/ai-gateway/keys/create.md with the old | | | header (line 21). Please re-run make docs/reference/cli/index.md after rebasing, or lint/docs-html and gen will fail.#30873 is still open, and git merge-tree shows it merges cleanly with this branch in either order. One optional wording nit is inline.
Generated by Coder Agents on behalf of @Jesswinters.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…headers # Conflicts: # docs/.style/style-guide/README.md
There was an error while loading. Please reload this page.
Documentation CheckUpdates Needed
Automated review via Coder Agents |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Re-reviewed at 4a7913cb3a, the merge of main that cleared the conflict from my last review. Approving: I found no blockers.
The merge resolution is correct. The only real conflict was the style guide's coverage counts, and the resolved table adds up: 88 rules, 10 tool-checked, 34 planned and 44 documentation-only, with the prose saying 78 by reading (79 on published pages), which matches. The other overlapping files merged cleanly, and the CORS matrix fix and the four corner cells shared with #30873 are intact. The one CLI page main changed (ai-gateway/keys/create.md) carries the new Property | Value header, and the gen job confirms it matches the generator.
Every CI job passes on this head, including gen, lint, lint-docs, check-docs, offlinedocs and required. Locally, go test passes for scripts/docshtmlcheck, scripts/clidocgen and scripts/styleclaims. go run ./scripts/docshtmlcheck and go run ./scripts/styleclaims both exit 0 on the merged tree, so nothing main brought in has an empty header cell.
There is one non-blocking nit, inline.
Generated by Coder Agents on behalf of @Jesswinters.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…headers # Conflicts: # docs/.style/style-guide/README.md # scripts/styleclaims/main.go # scripts/styleclaims/main_test.go
Assisted-by: AI
Assisted-by: AI
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.