GitHub Codespaces
Cloud dev environments, accessibility setup, and screen reader usage.
Listen
Transcript
Alex: Welcome back. GitHub Codespaces is one of those tools that can make a workshop feel a lot less fragile. Instead of asking every learner to install the same tools on a local computer, it gives you a VS Code development environment running on a cloud machine.
Jamie: And that cloud part matters because setup is often where people get stuck before they even touch Git.
Alex: Exactly. When you open a Codespace, GitHub creates a virtual machine, clones the repository into it, and connects that machine to a VS Code interface. You can use that interface in the browser, or connect it to VS Code Desktop on your own computer.
Jamie: So my screen reader, magnification, keyboard, and operating system are still local. The code environment is the part that lives somewhere else.
Alex: Right. That is a big accessibility win. You can use VS Code features like Screen Reader Optimized mode, audio cues, accessible diffs, zoom, themes, and the integrated terminal without installing compilers or language runtimes first. It also means everyone in a workshop can start from a similar environment, which makes troubleshooting much easier.
Jamie: When would I choose Codespaces instead of local VS Code?
Alex: Use Codespaces when setup would slow you down, when your local device is low-powered, when you are on a borrowed machine, or when a project needs tools you do not want to install locally. Local VS Code is still great when you already have your environment tuned, when you need offline access, or when you rely on extensions that work best on your desktop.
Jamie: Where does github.dev fit? I know pressing period on a GitHub repository opens a browser editor.
Alex: github.dev is great for quick edits because it opens a lightweight VS Code-style editor in the browser. But it does not give you a full cloud machine with a terminal. Codespaces is the choice when you need to run code, install packages, start a server, run tests, or use a development container.
Jamie: That also makes Codespaces useful on mobile or a low-end laptop, right?
Alex: Yes, with some practical limits. A phone or tablet can open a Codespace in the browser, and the heavy work happens in the cloud, not on the device. The tradeoff is screen size, touch keyboard friction, and browser behavior, so it is better for review and small edits than long coding sessions.
Alex: To create a Codespace from a repository page, open the repository on GitHub and move to the Code button. In the panel that opens, choose the Codespaces tab, then activate Create codespace on main, or the branch name you want.
Jamie: I always wonder what is happening after that click, because sometimes there is a wait and it feels mysterious.
Alex: GitHub is provisioning the virtual machine, attaching storage, cloning the repository, reading any environment configuration, and starting VS Code in a new browser tab. A normal startup may take 30 to 60 seconds, and larger projects can take longer.
Jamie: And there is also a dashboard, not just the repository page.
Alex: Yes. At github.com/codespaces, you can create a new Codespace, search for the repository, choose a branch, select a region, and pick a machine type. The default 2-core machine is enough for general development, documentation, and most workshop exercises. A 4-core machine helps with moderate builds or tests, and an 8-core machine is for heavier builds or multiple services.
Jamie: You mentioned environment configuration. Is that where devcontainer.json comes in?
Alex: Yes. A devcontainer.json file tells Codespaces how to build the development environment for the project. It can define the base image, install tools, recommend extensions, set environment variables, and run setup commands after the repository is created.
Jamie: So instead of saying, install Node, install Python, install this extension, set this folder, the repository can describe that setup.
Alex: Exactly. That is why it is so useful for classes and open source projects. A maintainer can encode the expected environment, and contributors can start with fewer surprises. It does not remove the need to understand the tools, but it removes a lot of local installation trouble.
Alex: Once the Codespace exists, you decide how you want to use it. The browser version opens as VS Code for the Web, with the Explorer, editor, terminal, Source Control view, extensions view, and command palette.
Jamie: Browser choice still matters, though.
Alex: It does. Codespaces works in Chrome, Edge, Firefox, and Safari, but Chrome and Edge tend to be the most consistent with NVDA and JAWS. Some VS Code extensions also are not available in the browser version, especially if they need local desktop capabilities.
Jamie: And if I want my familiar desktop setup?
Alex: Install the GitHub Codespaces extension in VS Code Desktop, sign in to GitHub, open the Command Palette with Ctrl+Shift+P or Cmd+Shift+P, and run Codespaces: Connect to Codespace. Then choose an existing Codespace or create a new one. Your screen reader is interacting with your local VS Code app, while the project and terminal still run on the cloud machine.
Jamie: Let's talk accessibility setup. What should a screen reader user check first?
Alex: VS Code usually detects a screen reader and turns on Screen Reader Optimized mode automatically. You can verify it from the Command Palette by searching for Toggle Screen Reader Accessibility Mode and pressing Enter. This applies in Codespaces the same way it does in desktop VS Code.
Jamie: What actually changes when that mode is on?
Alex: The editor is tuned to read content more predictably, especially line by line. Diff views become easier to review as text comparisons. Inline suggestions, including Copilot suggestions, are announced in a more controlled way instead of interrupting constantly.
Jamie: I also like audio cues because they catch things I miss visually.
Alex: Audio cues work in Codespaces just like in desktop VS Code. You can get tones for errors, warnings, breakpoints, task completion, and suggestion availability. To manage them, open Settings and search for audio cues, or run Help: List Audio Cues from the Command Palette.
Jamie: The terminal is the spot where people often lose their place. What helps there?
Alex: The integrated terminal is a standard terminal, so use the same patterns you use locally. In NVDA, Browse Mode helps you review output, Focus Mode lets you type, and setting maximum line length to 10000 can make long output easier to read. In JAWS, use Virtual Cursor for reading and PC Cursor for editing, often with Insert+Z or Num Pad Plus. On macOS, VoiceOver users can use Quick Nav and the Rotor, and if terminal text is hard to review, put focus in the terminal and press Alt+F2 for Accessible View.
Alex: The keyboard shortcuts are mostly standard VS Code shortcuts, so skills transfer well. Ctrl+Shift+P opens the Command Palette, Ctrl+P opens Quick Open for finding files, Ctrl+` toggles the integrated terminal, and Ctrl+B toggles the sidebar.
Jamie: Give me the panel shortcuts too, because those are easy to forget.
Alex: Ctrl+Shift+E opens Explorer, Ctrl+Shift+G opens Source Control, and Ctrl+Shift+X opens Extensions. In the editor, Ctrl+Shift+K deletes a line, Alt+Up and Alt+Down move a line, Ctrl+/ toggles a comment, and Ctrl+G jumps to a line number. In Source Control, you can review changed files, stage changes, write a commit message, commit, and push back to GitHub.
Jamie: And on a Mac, I should expect some Command-key versions.
Alex: Yes. Many shortcuts use Cmd instead of Ctrl on macOS, and browsers can sometimes intercept a shortcut before VS Code receives it. When in doubt, the Command Palette is the safest route because you can search for the action by name.
Jamie: What about previewing a web app? If the server runs inside the Codespace, how do I open it?
Alex: That is where port forwarding comes in. If your app starts a local server, maybe on port 3000 or 8000, Codespaces can detect that port and offer to forward it. You can open the forwarded address in a browser tab and test the app while it is still running in the cloud environment.
Jamie: Is that preview public by default?
Alex: Usually the forwarded port is private to you unless you change its visibility. Be careful before making a port public, especially if the app exposes test data, admin screens, or unfinished work. For most learning tasks, a private preview is enough.
Alex: Managing Codespaces is part of using them well. A Codespace can be stopped, resumed, or deleted, and those words do not mean the same thing.
Jamie: I want that distinction, because delete sounds scary and stop sounds harmless.
Alex: Stop pauses the cloud machine so it is not actively running, and you can resume it later. Delete removes the Codespace and its unpushed work, so push important commits before deleting. If you committed locally inside the Codespace but did not push, GitHub will not show those changes in the repository yet.
Jamie: And there are usage limits, even if many learners will not hit them in a workshop.
Alex: Personal GitHub accounts include a monthly free allowance for Codespaces, and typical workshop use is usually within that allowance. Still, machine size, running time, and storage can affect usage. Stop Codespaces you are not using, delete ones you no longer need, and check your GitHub billing and Codespaces usage pages if you are unsure.
Jamie: What about preferences that I want every time, like shell settings or editor themes?
Alex: Dotfiles can help with shell preferences, aliases, and setup scripts that you want applied to new Codespaces. VS Code Settings Sync can bring over settings like font size, theme, zoom, and some extension preferences. For low vision users, that means high-contrast themes and zoom choices can follow you into the browser-based editor.
Jamie: Let me throw a few common problems at you. Codespace takes forever, terminal stops reading, audio cues do not work, extensions are missing, or changes do not show up on GitHub.
Alex: If startup is slow, give it a little time, then reload or check whether the project is doing a heavy setup. If terminal output stops reading, use the screen reader's reading mode or VS Code Accessible View. If audio cues are silent, check VS Code settings, browser audio permissions, and whether the tab is muted. If an extension is unavailable in the browser, connect the Codespace to local VS Code Desktop. And if changes are not visible on GitHub, make sure you pushed, not just committed.
Jamie: So Codespaces is not a replacement for understanding Git or VS Code. It is a way to remove setup barriers and give everyone a workable starting point.
Alex: Yes. You still need the habits: know where your files are, use Source Control, commit clearly, push before cleanup, and verify the result on GitHub. But Codespaces can make the environment more predictable, especially for learners using screen readers, magnification, mobile devices, or low-end hardware. Because limits and interface names can change, the official GitHub Codespaces documentation is the place to check for current details.
Workshop Content
Companion Podcast and Transcript
Use audio and transcript companions to review concepts in a conversational format.
GitHub Codespaces
Companion audio: this episode reinforces key ideas and may not be a word-for-word reading of this page.
Open audio file (external) Full transcript source (external)
Transcript preview
Alex: Welcome back. GitHub Codespaces is one of those tools that can make a workshop feel a lot less fragile. Instead of asking every learner to install the same tools on a local computer, it gives you a VS Code development environment running on a cloud machine.
Jamie: And that cloud part matters because setup is often where people get stuck before they even touch Git.
Alex: Exactly. When you open a Codespace, GitHub creates a virtual machine, clones the repository into it, and connects that machine to a VS Code interface. You can use that interface in the browser, or connect it to VS Code Desktop on your own computer.
Jamie: So my screen reader, magnification, keyboard, and operating system are still local. The code environment is the part that lives somewhere else.
Appendix J: GitHub Codespaces
Listen to Episode 31: GitHub Codespaces - a conversational audio overview of this chapter. Listen before reading to preview the concepts, or after to reinforce what you learned.
Reference companion to: Chapter 01: Choose Your Tools | Also relevant: Chapter 11
Authoritative source: GitHub Docs: Codespaces
Cloud Development Environments - Accessibility Guide
GitHub Codespaces gives you a full VS Code development environment in your browser or connected to your local VS Code, running on a cloud machine. For screen reader users, this means a consistent, pre-configured environment with no local setup required.
Table of Contents
- What Is GitHub Codespaces?
- Creating a Codespace
- Codespace Environments
- Accessibility in Codespaces
- Screen Reader Configuration
- Keyboard Shortcuts in Codespaces
- Managing Your Codespaces
- Dotfiles and Persistent Configuration
- Codespaces vs GitHub.dev
- Common Issues and Workarounds
1. What Is GitHub Codespaces?
A Codespace is a cloud-hosted development environment. When you open one, GitHub provisions a virtual machine, clones your repository into it, and connects it to a VS Code interface - either in your browser or via your local VS Code Desktop.
Why this matters for accessibility
- No local installation of tools, compilers, or language runtimes required
- Your screen reader and OS settings stay on your machine; only the editor runs in the cloud
- VS Code's full accessibility features (audio cues, screen reader optimized mode, diff viewer) are available
- The environment is identical for every workshop participant - facilitators can reproduce issues reliably
Free tier: GitHub provides a monthly free allowance of Codespace hours for personal accounts. Workshop usage typically falls well within the free tier.
Learning Cards: Cloud Editors Overview
Screen reader users
- Codespaces gives you a full VS Code interface with terminal access -- your screen reader and OS settings stay on your local machine
- The browser-based editor activates screen reader optimized mode automatically if your OS signals a screen reader is running
- Connect a Codespace to your local VS Code Desktop (via the Codespaces extension) for the most familiar screen reader experience
Low vision users
- Settings Sync carries your font size, theme, and zoom preferences from local VS Code into Codespaces automatically
- The browser-based editor supports
Ctrl+=/Ctrl+-zoom just like desktop VS Code - Use a high-contrast VS Code theme -- it applies identically in the cloud editor
Sighted users
- Press
.on any GitHub repository page to open it instantly in github.dev (browser editor, no terminal) - Codespaces provisions a full VM with terminal -- use it when you need to run code, not just edit
- The default 2-core machine is sufficient for workshop exercises; upgrade only for heavy builds
2. Creating a Codespace
From a Repository Page
- Navigate to the repository on GitHub
- Press the Code button (keyboard shortcut: there is no direct shortcut - Tab to the button)
- In the panel that opens, choose the Codespaces tab
- Activate Create codespace on main (or your branch name)
- The Codespace opens in a new browser tab after provisioning (typically 30-60 seconds)
From the Codespaces Dashboard
- Go to github.com/codespaces
- Activate New codespace
- Use the search field to find your repository
- Choose a branch, machine type, and region
- Activate Create codespace
Machine Types
| Type | CPU | RAM | Best for |
|---|---|---|---|
| 2-core | 2 vCPU | 8 GB | General development, documentation |
| 4-core | 4 vCPU | 16 GB | Builds, tests, moderate workloads |
| 8-core | 8 vCPU | 32 GB | Heavy builds, multiple services |
For workshop exercises, the default 2-core machine is sufficient.
3. Codespace Environments
Browser (VS Code for the Web)
The Codespace opens directly in your browser as a fully functional VS Code interface.
- Works in Chrome, Edge, Firefox, and Safari
- Screen reader support varies slightly by browser - Chrome and Edge have the most consistent behavior with NVDA and JAWS
- No installation needed
- Some VS Code extensions are not available in the browser version
Local VS Code Desktop
If you prefer your local VS Code setup with your extensions and settings:
- Install the GitHub Codespaces extension in VS Code
- Sign in to GitHub in VS Code
- Open the Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) - Run Codespaces: Connect to Codespace
- Select an existing Codespace or create a new one
When connected via local VS Code, your screen reader interacts with your local VS Code installation - all your familiar settings apply.
4. Accessibility in Codespaces
Screen Reader Optimized Mode
When VS Code detects a screen reader, it automatically activates Screen Reader Optimized mode. You can verify or toggle it manually:
- Open the Command Palette (
Ctrl+Shift+P) - Search for Toggle Screen Reader Accessibility Mode
- Press Enter to activate
In this mode:
- The editor reads content line by line instead of character by character
- Diff views are rendered as accessible text comparisons
- Inline suggestions from Copilot are announced on a keypress rather than automatically
Audio Cues
VS Code in Codespaces supports the same audio cues as the desktop version:
| Event | Default Audio Cue |
|---|---|
| Error on current line | Tone |
| Warning on current line | Tone |
| Breakpoint hit | Tone |
| Task completed | Chime |
| Copilot suggestion available | Tone |
Enable audio cues via Settings → search for "audio cues" or run Help: List Audio Cues from the Command Palette.
Terminal Accessibility
The integrated terminal in a Codespace is a standard terminal:
- Screen readers read terminal output in NVDA and JAWS using their document/browse mode after output arrives
- In NVDA: Switch to Browse Mode to read static terminal output, then back to Focus Mode to type
- VS Code also has Accessible View (
Alt+F2when cursor is in the terminal) which renders terminal output in a navigable buffer
Learning Cards: Codespace Accessibility
Screen reader users
- Screen Reader Optimized mode activates automatically -- verify with Command Palette
Ctrl+Shift+Pthen "Toggle Screen Reader Accessibility Mode" - Audio cues (error, warning, task completed, Copilot suggestion) work identically in Codespaces and desktop VS Code
- In NVDA, switch to Browse Mode to read terminal output, then Focus Mode to type -- same pattern as local VS Code
Low vision users
- All VS Code zoom and theme settings apply in the browser-based Codespace --
Ctrl+=increases editor font size - Audio cues for errors and Copilot suggestions supplement visual indicators you might miss at lower zoom levels
- Chrome and Edge provide the most consistent rendering of the Codespace UI at high zoom and magnification levels
Sighted users
- The Codespace browser tab looks and feels like desktop VS Code -- same layout, same panels, same shortcuts
- Look for the green "Codespaces" badge in the bottom-left corner to confirm you are connected to a cloud environment
- If an extension is unavailable in the browser, connect the Codespace to local VS Code Desktop for full extension support
5. Screen Reader Configuration
NVDA
No special NVDA profile is required for Codespaces in the browser. The same settings recommended in Appendix B apply:
- Ensure Browse Mode is on for reading, Focus Mode for typing
- Set maximum line length to 10000 in NVDA Settings → Browse Mode
- In Chrome or Edge, NVDA's Browse Mode detection is generally reliable
JAWS
- Use Virtual Cursor for reading page content
- Switch to PC Cursor (Insert+Z or Num Pad Plus) when inside the editor and writing code
- JAWS works best with the Codespace in Chrome or Edge
VoiceOver (macOS)
- Use Quick Nav (Left+Right arrows) for moving through the VS Code interface
- The Rotor (VO+U) surfaces VS Code's landmark regions
- If text in the editor is not reading fluently, ensure Screen Reader Optimized mode is active (see above)
6. Keyboard Shortcuts in Codespaces
Codespaces uses standard VS Code keyboard shortcuts. The most important ones for workshop exercises:
Navigation
| Shortcut | Action |
|---|---|
| Ctrl+Shift+P | Command Palette |
| Ctrl+P | Quick Open (search files by name) |
| Ctrl+` | Toggle integrated terminal |
| Ctrl+Shift+E | Explorer panel |
| Ctrl+Shift+G | Source Control panel |
| Ctrl+Shift+X | Extensions panel |
| Ctrl+B | Toggle sidebar |
Editor
| Shortcut | Action |
|---|---|
| Ctrl+Shift+K | Delete line |
| Alt+↑ / Alt+↓ | Move line up/down |
| Ctrl+/ | Toggle line comment |
| Ctrl+G | Go to line number |
| F8 | Next error or warning |
| Shift+F8 | Previous error or warning |
| Alt+F2 | Accessible View (terminal, notifications, Copilot output) |
Source Control
| Shortcut | Action |
|---|---|
| Ctrl+Shift+G | Open Source Control panel |
| Ctrl+Enter | Commit (when focus is on message field) |
7. Managing Your Codespaces
Stopping a Codespace
Codespaces automatically stop after a period of inactivity (default: 30 minutes). To stop manually:
- Go to github.com/codespaces
- Find your Codespace in the list
- Activate the … menu next to it
- Choose Stop codespace
Stopped Codespaces retain your files and changes. They do not use compute hours while stopped.
Deleting a Codespace
- Go to github.com/codespaces
- Activate the … menu next to the Codespace
- Choose Delete
Note: Deleting a Codespace removes any uncommitted or unpushed changes permanently. Always commit and push your work before deleting.
Resuming a Codespace
- Go to github.com/codespaces
- Find your stopped Codespace
- Activate Open in … to resume it in the browser or in VS Code Desktop
8. Dotfiles and Persistent Configuration
If you have a repository named dotfiles on your GitHub account, Codespaces will automatically apply it when provisioning new environments. This is useful for:
- Setting your preferred shell (bash, zsh, fish)
- Adding shell aliases and functions
- Pre-installing command-line tools
To set up dotfiles: create a repository named dotfiles and add an install.sh script. Codespaces will run it automatically.
VS Code settings (themes, font size, keybindings) can be synchronized to Codespaces via Settings Sync (sign in with your GitHub account in VS Code settings).
9. Codespaces vs GitHub.dev
| Feature | GitHub Codespaces | GitHub.dev |
|---|---|---|
| Access | github.com/codespaces or press . then choose Codespaces |
Press . on any repository |
| Terminal | Yes - full terminal | No terminal |
| Extensions | Most VS Code extensions | Web-compatible extensions only |
| Run code | Yes | No |
| Cost | Free tier, then usage-based | Free |
| Screen reader support | Full VS Code + terminal | Full VS Code (no terminal) |
| Best for | Active development, running tests | Quick edits, reading code |
For workshop exercises that involve running scripts or tests, use Codespaces. For quickly browsing or editing a file, GitHub.dev is faster to open.
Learning Cards: Choosing Your Cloud Editor
Screen reader users
- GitHub.dev has no terminal -- choose Codespaces when you need to run commands, and github.dev for quick file edits
- Both editors support screen reader mode, but Codespaces gives you the full terminal Accessible View (
Alt+F2) that github.dev lacks - Press
.on any repo page for github.dev; use the Codespaces dashboard at github.com/codespaces for a full environment
Low vision users
- GitHub.dev loads instantly with your synced VS Code theme -- good for quick high-contrast reading of source files
- Codespaces takes 30-60 seconds to provision but gives you terminal, builds, and the same zoom/theme settings
- Both editors scale with browser zoom (
Ctrl+=) in addition to VS Code's own font-size settings
Sighted users
- Use github.dev (press
.) for quick drive-by edits -- it opens immediately with no provisioning wait - Use Codespaces when you need to run scripts, install dependencies, or test your changes before committing
- The comparison table above summarizes every difference -- refer back to it when deciding which to open
10. Common Issues and Workarounds
The Codespace takes a long time to open
Provisioning a new Codespace can take up to 90 seconds. If it hangs beyond that, refresh the browser tab and try again. Resuming an existing Codespace is much faster (5-10 seconds).
Screen reader stops reading after I switch to the terminal
Switch to Browse Mode (NVDA: Insert+Space; JAWS: Insert+Z) to read the terminal output, then return to Focus Mode to type your next command.
Audio cues are not working in the browser
Some browsers mute audio by default for new tabs. Check your browser's site permissions to ensure audio is allowed for github.dev or the Codespace URL.
Extensions I rely on locally are not available
Some extensions are not compatible with the browser-based VS Code. Connect to the Codespace via VS Code Desktop instead (see Section 3) to access your full extension library.
I accidentally deleted my Codespace before pushing
If the branch exists on GitHub, you can create a new Codespace from it. Uncommitted changes in a deleted Codespace cannot be recovered.
My changes are not showing in GitHub after committing
You may have committed but not pushed. In the Source Control panel, look for the Sync Changes or Push button. Run git push in the terminal if needed.
Next: Appendix K: Copilot Reference
Back: Appendix I: GitHub CLI Reference
Teaching chapter: Chapter 01: Choose Your Tools
Authoritative Sources
Use these official references when you need the current source of truth for facts in this chapter.
- GitHub Docs, home
- GitHub Changelog
- VS Code Copilot chat overview
- VS Code agent overview
- VS Code custom instructions
Section-Level Source Map
Use this map to verify facts for each major section in this file.
- Cloud Development Environments - Accessibility Guide: GitHub Docs, home, GitHub Changelog, VS Code Copilot chat overview, VS Code agent overview, VS Code custom instructions
- 1. What Is GitHub Codespaces?: GitHub Docs, home, GitHub Changelog, VS Code Copilot chat overview, VS Code agent overview, VS Code custom instructions
- 2. Creating a Codespace: GitHub Docs, home, GitHub Changelog, VS Code Copilot chat overview, VS Code agent overview, VS Code custom instructions
- 3. Codespace Environments: GitHub Docs, home, GitHub Changelog, VS Code Copilot chat overview, VS Code agent overview, VS Code custom instructions
- 4. Accessibility in Codespaces: GitHub Docs, home, GitHub Changelog, VS Code Copilot chat overview, VS Code agent overview, VS Code custom instructions
- 5. Screen Reader Configuration: GitHub Docs, home, GitHub Changelog, VS Code Copilot chat overview, VS Code agent overview, VS Code custom instructions
- 6. Keyboard Shortcuts in Codespaces: GitHub Docs, home, GitHub Changelog, VS Code Copilot chat overview, VS Code agent overview, VS Code custom instructions
- 7. Managing Your Codespaces: GitHub Docs, home, GitHub Changelog, VS Code Copilot chat overview, VS Code agent overview, VS Code custom instructions
- 8. Dotfiles and Persistent Configuration: GitHub Docs, home, GitHub Changelog, VS Code Copilot chat overview, VS Code agent overview, VS Code custom instructions
- 9. Codespaces vs GitHub.dev: GitHub Docs, home, GitHub Changelog, VS Code Copilot chat overview, VS Code agent overview, VS Code custom instructions
- 10. Common Issues and Workarounds: GitHub Docs, home, GitHub Changelog, VS Code Copilot chat overview, VS Code agent overview, VS Code custom instructions