This is a browser extension that runs a simple JavaScript snippet on github.com domain and aims to encourage accessibility mindfulness while navigating GitHub. Users interact with GitHub predominantly through the markdown editor. The markdown editor allows users to set headings and share images, both of which require care to ensure accessibility.
- Clone or download this repo.
- Navigate to
chrome://extensions/
. - Flip on "Developer Mode" in the upper right-hand corner.
- Select "Load unpacked".
- Choose this unzipped repo folder.
- Navigate to github.com.
- Optional but recommended: Set custom styles to your preference. Learn more in the Customization note.
** Note: Firefox cannot load this extension until support for Manifest V3 and background services is released. See mozilla/web-ext#2379 (comment) **
- Clone or download this repo. Make sure to extract any compressed files to the directory structure of this project.
- Navigate to
about:debugging#/runtime/this-firefox
. - Select
Load Temporary Add-on...
. - Choose a file in the repository directory.
- Navigate to github.com.
- Optional but recommended: Set custom styles to your preference. Learn more in the Customization note.
This extension will only run on GitHub domain and does the following on all markdown bodies on GitHub:
- Creates a text overlay over all images with the alt text. This includes Pull Requests, Issues, Repo READMEs, and Discussions.
- If an image is missing an alt text, it will appear with a red border.
- If an image has alt text but is non-descriptive like
image
or the default macOS screenshot name, it will appear with a red border. - If an image has an empty string alt like
""
, it will also appear with a red border. Typically, an empty string alt indicates that an image is decorative and should be hidden. However, on GitHub, all markdown images are rendered within a link element. Therefore, we recommend that all images in GitHub markdown have an alt text provided, or else link will be announced without a name,
- Appends the heading level that is used after the heading text within markdown bodies. Heading levels are useful for conveying semantics for screen reader, and other assistive technology users, but they are not currently surfaced on GitHub. This extension makes the heading level more visually apparent.
The styling I've set may not be suitable for all users. Feel free to customize these however you like when you download these files.
You can do this by modifying styles.css
. There are CSS variables at the top which you may set to your preference. For example, you may choose to set a different color for each heading level or remove the border. If you'd prefer the headings to be positioned at the front, follow the notes in contentScript.js
. Once changes are made, Update
on chrome://extensions/
so changes are reflected in the extension.
This extension may break if GitHub markup changes. If you encounter a bug, please file a ticket. Contributions welcome.