GithubHelp home page GithubHelp logo

andrialexandrou / github-a11y Goto Github PK

View Code? Open in Web Editor NEW

This project forked from khiga8/github-a11y

0.0 0.0 0.0 204 KB

This is a browser extension that aims to encourage accessibility awareness while using GitHub

JavaScript 79.95% CSS 16.19% Shell 0.22% HTML 3.63%

github-a11y's Introduction

github-a11y

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.

Setup

Chrome

  1. Clone or download this repo.
  2. Navigate to chrome://extensions/.
  3. Flip on "Developer Mode" in the upper right-hand corner.
  4. Select "Load unpacked".
  5. Choose this unzipped repo folder.
  6. Navigate to github.com.
  7. Optional but recommended: Set custom styles to your preference. Learn more in the Customization note.

Firefox

** Note: Firefox cannot load this extension until support for Manifest V3 and background services is released. See mozilla/web-ext#2379 (comment) **

  1. Clone or download this repo. Make sure to extract any compressed files to the directory structure of this project.
  2. Navigate to about:debugging#/runtime/this-firefox.
  3. Select Load Temporary Add-on....
  4. Choose a file in the repository directory.
  5. Navigate to github.com.
  6. Optional but recommended: Set custom styles to your preference. Learn more in the Customization note.

Features

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,

Example screenshots of two images that have been posted on a GitHub issue, each appearing with alt text overlay. The first has unhelpful alt text based on the filename, `Screen Shot 2022-02-10` while the second image has a more intentional alt text, `Screenshot of example select menu...`.

  • 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.

Example screenshots of heading levels appended at end of heading text line inside a GitHub markdown, each represented by a different color

Customization note

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.

Resources

Image alt text

Heading levels

Bug?

This extension may break if GitHub markup changes. If you encounter a bug, please file a ticket. Contributions welcome.

github-a11y's People

Contributors

khiga8 avatar kendallgassner avatar inkblotty avatar koddsson avatar joycezhu avatar andrialexandrou avatar rfearing avatar cheshire137 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.