Wiki-ready docs: SVG diagrams, prose descriptions, accessible formatting#168
Wiki-ready docs: SVG diagrams, prose descriptions, accessible formatting#168taylorarndt merged 13 commits intomainfrom
Conversation
…text descriptions
|
@accesswatch making pr because of huge changes. |
There was a problem hiding this comment.
Pull request overview
This PR makes the workshop documentation “wiki-ready” by replacing fragile ASCII diagrams with generated SVG images plus prose descriptions, and by refactoring some table/list-heavy sections for more consistent rendering and accessibility across GitHub and the GitHub Wiki.
Changes:
- Add a Python generator that renders a set of ASCII-based diagrams into SVGs under
docs/images/. - Replace several in-doc ASCII diagrams with embedded SVG images and add “Description” sections beneath them.
- Convert selected tabular/key-value content into prose-style formatting and adjust some code-block formatting to avoid problematic characters on the wiki.
Reviewed changes
Copilot reviewed 12 out of 19 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/generate-diagram-svgs.py |
Adds the generator used to produce diagram SVGs in docs/images/. |
docs/images/workflow-folder-tree.svg |
New generated diagram image for workflow folder structure. |
docs/images/template-folder-tree.svg |
New generated diagram image for issue template folder structure. |
docs/images/repo-page-layout-02.svg |
New generated diagram image for repository page layout (variant 2). |
docs/images/repo-page-layout-01.svg |
New generated diagram image for repository page layout (variant 1). |
docs/images/pr-tree.svg |
New generated diagram image for PR extension panel tree. |
docs/images/learning-room-tree.svg |
New generated diagram image for the Learning Room PR tree concept. |
docs/images/diff-viewer-tree.svg |
New generated diagram image for VS Code accessible diff viewer structure. |
docs/appendix-q-github-actions-workflows.md |
Replaces an inline ASCII diagram with an SVG + prose description. |
docs/appendix-m-vscode-accessibility-reference.md |
Replaces an inline ASCII diagram with an SVG + prose description. |
docs/appendix-i-github-projects.md |
Converts multiple simple tables into prose/bold-term format; keeps truly tabular data as a table. |
docs/15-issue-templates.md |
Replaces an inline ASCII folder tree with an SVG + prose description; adjusts a “table” example format. |
docs/14-accessible-code-review.md |
Adjusts code-block instructions to avoid problematic glyphs/characters and improve clarity. |
docs/12-github-pull-requests-extension.md |
Replaces an inline ASCII tree with an SVG + prose description. |
docs/06-merge-conflicts.md |
Reworks examples to avoid wiki-hostile characters in code blocks; updates merge-conflict snippets. |
docs/04-working-with-issues.md |
Replaces arrow/pipe-heavy ASCII formatting inside code blocks with ASCII-safe equivalents. |
docs/03-the-learning-room.md |
Replaces an inline ASCII tree with an SVG + prose description; refactors sections into table/list formats. |
docs/02-navigating-repositories.md |
Replaces an inline ASCII layout diagram with an SVG + prose description. |
docs/01-understanding-github-web-structure.md |
Converts a repository-tabs code-block snippet into prose and replaces a large ASCII layout diagram with SVG + prose description. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| out_dir = os.path.join(os.path.dirname(__file__), "..", "docs", "images") | ||
| os.makedirs(out_dir, exist_ok=True) | ||
|
|
||
| for name, lines in diagrams.items(): | ||
| svg = generate_svg(lines) | ||
| path = os.path.join(out_dir, f"{name}.svg") | ||
| with open(path, "w", encoding="utf-8") as f: | ||
| f.write(svg) | ||
| print(f"Created {path}") | ||
|
|
||
| print(f"\nDone: {len(diagrams)} SVGs generated.") |
There was a problem hiding this comment.
This script executes file generation at import time. Other Python utilities in the repo use an if __name__ == "__main__": entrypoint; adding the same pattern here would make it safer to import/reuse generate_svg without side effects and more consistent with existing scripts.
| out_dir = os.path.join(os.path.dirname(__file__), "..", "docs", "images") | |
| os.makedirs(out_dir, exist_ok=True) | |
| for name, lines in diagrams.items(): | |
| svg = generate_svg(lines) | |
| path = os.path.join(out_dir, f"{name}.svg") | |
| with open(path, "w", encoding="utf-8") as f: | |
| f.write(svg) | |
| print(f"Created {path}") | |
| print(f"\nDone: {len(diagrams)} SVGs generated.") | |
| def main(): | |
| out_dir = os.path.join(os.path.dirname(__file__), "..", "docs", "images") | |
| os.makedirs(out_dir, exist_ok=True) | |
| for name, lines in diagrams.items(): | |
| svg = generate_svg(lines) | |
| path = os.path.join(out_dir, f"{name}.svg") | |
| with open(path, "w", encoding="utf-8") as f: | |
| f.write(svg) | |
| print(f"Created {path}") | |
| print(f"\nDone: {len(diagrams)} SVGs generated.") | |
| if __name__ == "__main__": | |
| main() |
| **Attention Items:** | ||
| - Stale: "Update screen reader navigation guide" - In Review for 9 days, no activity | ||
| - Unassigned: "Triage accessibility bug backlog" in In Progress |
There was a problem hiding this comment.
The PR description states a preference to avoid bullet lists for descriptive content due to screen reader overhead, but this section reintroduces a bullet list for the “Attention Items”. If the goal is consistent wiki/screen-reader-friendly formatting, consider converting these bullets into short prose sentences (or a bold-term format) like the other table-to-prose conversions in this PR.
| The learning-room repository contains these files and folders: | ||
|
|
||
| - **README.md** -- Getting started guide | ||
| - **AUTOMATION.md** -- How the bot works | ||
| - **.github/** | ||
| - **workflows/** -- 3 automation workflows | ||
| - learning-room-pr-bot.yml (PR validation) | ||
| - skills-progression.yml (progress tracking) | ||
| - student-grouping.yml (peer pairing) | ||
| - **scripts/** |
There was a problem hiding this comment.
The PR description states a preference to avoid bullet lists for descriptive content, but this “folder structure” section is presented as a nested bullet list. If list markup is causing wiki/screen-reader friction, consider switching to a prose/bold-term format (one item per paragraph) or another non-list structure that still preserves hierarchy.
| <<<<<<< HEAD (Current Change) | ||
| Your version | ||
| ||||||| original ← (3-way merge, if enabled) | ||
| ======= original -- (3-way merge, if enabled) |
There was a problem hiding this comment.
The VS Code merge-conflict example shows ======= original as the diff3 “original” marker, but Git’s diff3 conflict format uses a ||||||| original line (and ======= is already the standard separator). This example is likely to confuse readers and doesn’t match actual conflict output; consider replacing with an accurate marker (or a non-marker label like ORIGINAL (diff3) if you need to avoid | characters).
| ======= original -- (3-way merge, if enabled) | |
| ||||||| original -- (3-way merge, if enabled) |
| 1. Create a table: | ||
|
|
||
| ```text | ||
| Field Name | Type (dropdown/input/textarea) | Why Required? | Options (if dropdown) | ||
| [name] | [type] | [reason] | [choices] | ||
| ``` | ||
| Field Name -- Type (dropdown/input/textarea) -- Why Required? -- Options (if dropdown) | ||
| [name] -- [type] -- [reason] -- [choices] | ||
| ``` |
There was a problem hiding this comment.
This section still says “Create a table:” but the example no longer forms a table (pipes were replaced with --). Either update the instruction to reflect the new format, or provide a wiki-safe table representation so learners can copy/paste an actual table.
| max_len = max(len(line) for line in lines) | ||
| w = int(max_len * CHAR_W + 2 * PAD_X) | ||
| h = int(len(lines) * LINE_H + 2 * PAD_Y) |
There was a problem hiding this comment.
int(max_len * CHAR_W + 2 * PAD_X) truncates fractional pixels; with some fonts/browsers this can clip the last character(s) at the right edge. Consider using math.ceil(...) (and similarly for height if needed) to guarantee enough space for the rendered text.
…ange Runs scripts/generate-diagram-svgs.py on push to main whenever the script is updated, commits any new/changed SVGs back to the repo. Supports workflow_dispatch for manual re-generation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
# Conflicts: # docs/02-navigating-repositories.md # docs/03-the-learning-room.md # docs/12-github-pull-requests-extension.md # docs/15-issue-templates.md # docs/appendix-i-github-projects.md # docs/appendix-m-vscode-accessibility-reference.md # docs/appendix-q-github-actions-workflows.md
Summary
Taylor made the
wickybranch to experiment with getting the workshop docs wiki-ready. This PR captures everything that happened — what we tried, what failed, what worked, and why. The branch name iswickybecause it was a wiki experiment playground.Branch to review: https://github.com/Community-Access/git-going-with-github/tree/wicky
What This PR Does
1. ASCII art diagrams replaced with SVG images (7 diagrams)
Every ASCII art diagram that used box-drawing characters or tree structures is now an SVG image rendered with monospace text on a dark background. Each image is followed by a "Description" heading and a full prose text description so screen reader users always know there is a readable explanation below the image.
Files with diagram changes:
docs/01-understanding-github-web-structure.md— repository page layout (box art)docs/02-navigating-repositories.md— repository page layout (box-drawing chars)docs/03-the-learning-room.md— learning room shared repo treedocs/12-github-pull-requests-extension.md— PR extension panel treedocs/15-issue-templates.md— template folder structure treedocs/appendix-m-vscode-accessibility-reference.md— accessible diff viewer treedocs/appendix-q-github-actions-workflows.md— workflow folder treePattern in every file:
2. Tables converted to prose (appendix-i-github-projects.md)
Four data tables were converted to bold-term prose format because they rendered poorly on the wiki and were harder to scan with a screen reader:
The project status example table (with real columnar data) was deliberately kept as a table because it represents actual tabular data.
3. Box-drawing characters cleaned up in code blocks
Files that had box-drawing characters or arrows inside code blocks were cleaned up to use ASCII equivalents so they render consistently everywhere. This affects:
docs/04-working-with-issues.mddocs/05-working-with-pull-requests.mddocs/06-merge-conflicts.mddocs/07-culture-etiquette.mddocs/14-accessible-code-review.md4. README repository tree replaced
The large ASCII tree in the README that mapped the entire repo structure was replaced with a cleaner version using ASCII-safe characters instead of box-drawing characters.
5. GitHub Actions workflow for wiki sync
Added
.github/workflows/sync-docs-to-wiki.yml— automatically syncsdocs/to the GitHub Wiki whenever docs change on the main branch.6. SVG generation script
Added
scripts/generate-diagram-svgs.py— a Python script that generates all 7 SVG diagram images. Uses monospace font on a dark background (#161b22) with light text (#e6edf3) and rounded corners. Can be re-run anytime the diagrams need updating.The Journey — What We Tried and Why
This was not a straight path. Here is the full story of what happened, what I tried, and what decisions were made along the way.
Attempt 1: Raw ASCII art on the wiki
The original docs had ASCII art using box-drawing characters inside code blocks. On the main GitHub repo these render fine. But on the GitHub Wiki, pipe characters inside code blocks were being parsed as markdown table cells, breaking the layout completely. The box-drawing characters also looked inconsistent across different font stacks.
Result: Diagrams looked broken on the wiki. Kept working in the main repo.
Attempt 2: Replace box-drawing chars with ASCII
Replaced all box-drawing characters with plain ASCII (
+,-,|). This fixed the character rendering issue but the pipe problem on the wiki persisted — GitHub Wiki parses pipe as table syntax even inside fenced code blocks.Result: Still broken on wiki. Slightly better but fundamentally the same problem.
Attempt 3: Mermaid diagrams
Converted all 7 diagrams to Mermaid code blocks. Mermaid renders as SVG on GitHub, so no text-parsing issues. Added
accTitleandaccDescrproperties to each Mermaid block for accessibility.What happened: Mermaid rendered as opaque SVG images. Screen readers could not navigate the nodes — the entire diagram was a single image element. The
accTitleandaccDescrmetadata was actually making things worse — the screen reader would read the accessibility metadata as noise before hitting the diagram, but the diagram itself was still completely opaque. It was the worst of both worlds: extra text to wade through, then an unreadable image.Result: Mermaid is NOT accessible for screen reader users despite having accessibility metadata. Abandoned.
Attempt 4: Mermaid with prose descriptions, no accessibility metadata
Kept Mermaid diagrams but removed
accTitle/accDescr. Added full prose text descriptions above each diagram so screen readers would read the text and sighted users would see the Mermaid SVG.What happened: The prose descriptions were good, but the Mermaid diagrams themselves were not reliably showing the textual diagram content — they rendered differently across contexts, and the screen reader experience was still poor because the Mermaid SVG was just noise after the description.
Result: Descriptions worked great. Mermaid did not.
Attempt 5: Back to original ASCII art + prose descriptions
Pulled the original ASCII art from
mainbranch and restored all 7 diagrams in code blocks, keeping the prose descriptions above them.What happened: The ASCII art looked correct in the repo, but still had rendering issues on the wiki (the original problem). And visually it was not clean.
Attempt 6 (Final): SVG images + prose descriptions + Description heading
The final solution that stuck:
Generated SVG images from the ASCII art content using a Python script. The SVGs use monospace font on a dark background — they look like code blocks but render as images, so no text-parsing issues anywhere.
Image first, description below. Sighted users see the diagram immediately, then screen reader users find the description by heading navigation.
No alt text on images. Since the full prose description is right below each image under a "Description" heading, alt text would be redundant and create double-reading for screen reader users. The image uses empty alt and the description heading serves as the accessible alternative.
"Description" heading at the correct nesting level so screen reader users can press H to jump to it and know a text description follows every diagram.
Formatting Decisions
Throughout the process, several formatting preferences were established:
Files Changed (23 total)
docs/images/scripts/generate-diagram-svgs.py.github/workflows/sync-docs-to-wiki.ymldocs/01-*,docs/02-*,docs/03-*,docs/12-*,docs/15-*,appendix-m-*,appendix-q-*docs/appendix-i-github-projects.mddocs/04-*,docs/05-*,docs/06-*,docs/07-*,docs/14-*README.mdCommit History
You can see the full journey in the commits — Mermaid in, Mermaid out, ASCII back, SVGs final.
Wiki Status
The wiki has been manually synced throughout development. Once this merges, the GitHub Action at
.github/workflows/sync-docs-to-wiki.ymlwill auto-syncdocs/to the wiki on every push to main.How to Review
wickybranch on GitHub to see all changes rendered@accesswatch