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

Related tags

React github-a11y
Overview

github-a11y

This is a Google Chrome 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.

Prerequisite

This assumes you are using a Google Chrome browser.

Setup

  1. Download this repo as a ZIP file.
  2. Navigate to chrome://extensions/.
  3. Select Load unpacked.
  4. Choose this unzipped repo folder.
  5. Navigate to github.com.

Features

This extension will only run on GitHub domain and does the folowing 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. Images are frequently shared within GitHub. This image overlay aims to bring awareness about alt text particularly for sighted users who may not rely on alt text.

Example screenshots of images that have been posted on a GitHub issue. The extension has added a white text containing alt text against dark image overlay.

  • 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. This similarly aims to bring mindfulness particularly for sighted users who may pay less attention to heading level semantics.

Example screenshots of purple heading levels appended in at end of heading text line inside a GitHub markdown

Customization note

This is currently not customizable and the styling I've set may not be suitable for all users. Feel free to customize this however you like when you download these files. You can do this by modifying styles.css to your preferred styling. If you'd prefer the headings to be positioned at front, follow the notes in contentScript.js. Then press Update on chrome://extensions/ so changes are reflected in extension.

Resources

Image alt text

Heading levels

Bug?

If you encounter a bug, please file a ticket. Contributions welcome.

Comments
  • Markdown Suggestions

    Markdown Suggestions

    Markdown Accessibility dev-tools

    I am working to create a markdown dev-tools validator. The validator will check any textArea that:

    • is not hidden on the screen i.e. clientWidth=0
    • has content i.e. value != ''

    Working Rules

    • checks that written markdown has a heading
    • ensures that written markdown does not use an h1 tag
    • ensures that written markdown includes descriptive links

    Features:

    • On non-github pages the validation Button and the reset button are disabled.
    • The reset button will clear all of the error messages, and remove any added focus rings.
    • The Find TextArea button will highlight the markdown field that the error stems from

    A snippet of what the markdown dev-tools looks like:

    Markdown accessibility dev-tools showing results of a markdown validation. The results show errors in one textareas

    Questions:

    • not sure If I we should be using the Mona illustration

    Future TODOS:

    • I would love to use primer components and replace a lot of the styling in panel.css
    • We should internationalization the non-descriptive link text array so users who do write their markdown in english can also use this feature.
    • validate image alt text
    • Report bugs individually. For example we report the "Non Descriptive Links" error once ... even if multiple links are not descriptive but it would be nice to report each link individually to provide more descriptive feedback.
    opened by kendallgassner 7
  • Don't allow empty alt attribute

    Don't allow empty alt attribute

    Fixes: https://github.com/khiga8/github-a11y/issues/28

    • [x] account for images which are typically wrapped with an anchor tag.
    • [x] account for new GIF player and ensure overlay properly appears ~~(which is an img but has a button parent with aria-label)~~
    opened by khiga8 7
  • Note extension is currently incompatible w/Firefox

    Note extension is currently incompatible w/Firefox

    Sadly, due to Firefox still plugging away at Manifest V3 support, it's not too thrilled about loading this extension. https://blog.mozilla.org/addons/2021/05/27/manifest-v3-update/

    opened by JoyceZhu 0
  • Add Prettier and prettier pre-commit hook

    Add Prettier and prettier pre-commit hook

    I wanted to make sure that we had no extra or excess formatting changes on future prs.

    • Prettier will format the files
    • and husky ensures that prettier runs on and changed file right before a developer commits the changes
    opened by kendallgassner 0
  • bug: avoid page crash

    bug: avoid page crash

    This PR makes a couple of updates:

    • fix bug where page crashes when I go to Notifications from home page. This is a recent issue I've been noticing. I think there might be an infinite mutation loop happening when I go from GitHub home to Notifications. I am unable to hit a breakpoint when I try to debug, but adding observer.disconnect(); call within the callback fixes the issue.
    • adds an interval to debounce making the appendAccessibilityInfo updates
    • updates the selector we listen to from mutation.target.matches('.markdown-body') to mutation.target.closest('.markdown-body')
    opened by khiga8 0
  • Update validation to account for the fact that images are nested in links.

    Update validation to account for the fact that images are nested in links.

    On GitHub, all images in markdown turn into links. Therefore, setting alt='' will never make sense because that results in a link being rendered without a name, potentially causing confusion. Our validation should account for that fact.

    good first issue 
    opened by khiga8 0
  • fix: make sure extension works with recent navigation changes

    fix: make sure extension works with recent navigation changes

    Fixes https://github.com/khiga8/github-a11y/issues/23

    This extension started working only on page refreshes due to recent navigation changes. This adds an eventListener for turbo load events to ensure this extension works properly when turbo is being used.

    opened by khiga8 0
  • set each heading to different color

    set each heading to different color

    For quicker visual processing, I think it's helpful to have each heading level represent a different color. Therefore I am making this the default instead of a single purple color represent all heading levels. If consumers do not like this default, they can choose their own customizations following instructions in the README.

    I used http://colorsafe.co/ to vet out colors that meet WCAG color contrast requirements, but some may find these colors unsuitable.

    Screen shot of extension appending heading levels to GitHub markdown with heading text. Each heading level has a different color
    opened by khiga8 0
  • Run scan when change to js-commit-preview is observed

    Run scan when change to js-commit-preview is observed

    Fixes https://github.com/khiga8/github-a11y/issues/17

    This presumably has to do with how content of js-commit-preview changes and markdown-body is injected in as a child element. Not sure why MutationObserver doesn't have a mutation for markdown-body, but this fixes this issue in the interim.

    opened by khiga8 0
  • changes are not detected when previewing markdown file changes in web editor

    changes are not detected when previewing markdown file changes in web editor

    I was working on a README update through web editor but the extension didn't run when switching to Preview tab.

    Putting some print statements in, there is a mutation.target that matches .js-commit-preview but not .markdown-body even though the content of markdown-body changes. ๐Ÿค”

    bug help wanted 
    opened by khiga8 0
  • Fix alt overlay issue and deprecate support outside `github.com` and `gist.github.com` host.

    Fix alt overlay issue and deprecate support outside `github.com` and `gist.github.com` host.

    Fixes https://github.com/khiga8/github-a11y/issues/12

    Context

    Previously the text overlay was styled to appear over the image. This resulted in text covering the image. Another problem was that when there were multiple images on the same line, the captions for each image will overlap on top of each other.

    Instead, we have the text overlay appear below the image and a border outlining the image and overlay to group it together. Additionally, we ensure that the alt text overlay is added when image is nested inside table and other elements, not just <p>.

    This also turns off the extension outside of the github.com and gist.github.com domain where support may be wonky.

    Screenshots

    Before:

    screenshot of three images appearing horizontally inline. the text overlay for each image overlaps on top of each other making it unreadable screenshot of text overlay missing  when image is nested inside a table cell

    After:

    screenshot of text overlay appearing below each of the three images without overlapping on each other or the image screenshot of text overlay appearing over each image nested inside a table cell
    opened by khiga8 0
  • WIP: Account for recent updates

    WIP: Account for recent updates

    Relates to: https://github.com/khiga8/github-a11y/issues/44

    When images are wrapped in a link:

    • Don't allow alt="" ever
    • Check if link has aria-label or aria-labelledby

    When images are not wrapped in a link:

    • Allow alt="". Indicate that the image has been hidden.
    opened by khiga8 0
  • Markdown suggestions should report bugs individually

    Markdown suggestions should report bugs individually

    Currently we report the "Non Descriptive Links" error once ... even if multiple links are not descriptive. We should report each bug individually to provide more descriptive feedback.

    example

    This markdown:

    <a>Learn more</a>
    <a>Click here</a>
    

    Should output two non descriptive link errors -- right now it will output one.

    Acceptance Criteria

    • [ ] - each rule break is reported individually
    • [ ] - a user can tell the exact link that is being broken. Perhaps this means adding a message "Link on line 10 is needs to be more descriptive.."
    opened by kendallgassner 0
  • Validate image alt text in devtool suggestions

    Validate image alt text in devtool suggestions

    Add a rule to validate image alt text inside the devtools suggestions.

    Acceptance Criteria

    • [ ] - does a user add alt text
    • [ ] - is the alt text empty (this might be a warning instead of an error)
    opened by kendallgassner 0
  • Add Internationalization into the extension

    Add Internationalization into the extension

    We should add Internationalization throughout the chrome extension. I.e. We should have our chrome extension switch languages depending on user preference.

    Acceptance Criteria

    • [ ] The list of non descriptive link text changes with users language preference
    • [ ] Our feedback changes with users language preference
    • [ ] set the default language to english
    opened by kendallgassner 0
  • Replace Dev-tool components with Primer Components

    Replace Dev-tool components with Primer Components

    We are rewriting css instead of using primer components -- this will lead to issues down the line if primer has a redesign. It would be nice to use primer components to avoid future issues and keep consistency.

    We may need to spike this idea out. I am not actually sure how easy it is to use design system components inside a chrome extension since importing in a chrome extension is challenging.

    Acceptance Criteria

    • [ ] Replace buttons with primer button
    • [ ] Replace links with primer link
    • [ ] Utilize Primer color values
    opened by kendallgassner 0
Releases(v0.8)
  • v0.8(Jul 20, 2022)

    What's Changed

    • Add Prettier and prettier pre-commit hook by @kendallgassner in https://github.com/khiga8/github-a11y/pull/36
    • Markdown Suggestions by @kendallgassner in https://github.com/khiga8/github-a11y/pull/37
    • Change github image by @kendallgassner in https://github.com/khiga8/github-a11y/pull/42

    New Contributors

    • @kendallgassner made their first contribution in https://github.com/khiga8/github-a11y/pull/36 ๐ŸŽ‰

    Full Changelog: https://github.com/khiga8/github-a11y/compare/v0.7...v0.8

    Source code(tar.gz)
    Source code(zip)
  • v0.7(Jul 11, 2022)

    What's Changed

    • Bug fix: Don't allow empty alt attribute by @khiga8 and @andrialexandrou in https://github.com/khiga8/github-a11y/pull/33. This fixes a bug where images with empty alt were not being flagged.

    Full Changelog: https://github.com/khiga8/github-a11y/compare/v0.6...v0.7

    Source code(tar.gz)
    Source code(zip)
  • v0.6(Jun 30, 2022)

    What's Changed

    • Detail how to install this extension in Firefox by @koddsson in https://github.com/khiga8/github-a11y/pull/29
    • feat: adds "enable developer mode" step to the readme by @andrialexandrou in https://github.com/khiga8/github-a11y/pull/32
    • bug: avoid page crash by @khiga8 in https://github.com/khiga8/github-a11y/pull/34
    • Upgrade to manifest v3 by @khiga8 in https://github.com/khiga8/github-a11y/pull/35

    New Contributors

    • @andrialexandrou made their first contribution in https://github.com/khiga8/github-a11y/pull/32

    Full Changelog: https://github.com/khiga8/github-a11y/compare/v0.5...v0.6

    Source code(tar.gz)
    Source code(zip)
  • v0.5(Apr 7, 2022)

    What's Changed

    • Run scan when change to js-commit-preview is observed by @khiga8 in https://github.com/khiga8/github-a11y/pull/20
    • Set default to border bottom by @khiga8 in https://github.com/khiga8/github-a11y/pull/21
    • set each heading to different color by @khiga8 in https://github.com/khiga8/github-a11y/pull/22
    • fix: make sure extension works with recent navigation changes by @khiga8 in https://github.com/khiga8/github-a11y/pull/24

    Full Changelog: https://github.com/khiga8/github-a11y/compare/v0.4...v0.5

    Source code(tar.gz)
    Source code(zip)
  • v0.4(Feb 16, 2022)

    What's Changed

    • Run accessibility scanner when previewing markdown by @koddsson in https://github.com/khiga8/github-a11y/pull/14
    • instructions for how to update positioning by @khiga8 in https://github.com/khiga8/github-a11y/pull/11
    • Fix alt overlay issue and deprecate support outside github.com and gist.github.com host. by @khiga8 in https://github.com/khiga8/github-a11y/pull/13
    • Fix issue where empty alt attribute is treated as invalid by @khiga8 in https://github.com/khiga8/github-a11y/pull/15
    • make it easy to customize heading color by @khiga8 in https://github.com/khiga8/github-a11y/pull/16

    New Contributors ๐Ÿ’–

    • @koddsson made their first contribution in https://github.com/khiga8/github-a11y/pull/14

    Full Changelog: https://github.com/khiga8/github-a11y/compare/v0.3...v0.4

    Source code(tar.gz)
    Source code(zip)
  • v0.3(Feb 14, 2022)

    What's Changed

    Bug Fixes

    • Add filter so background.js does not run on non-github sites. by @khiga8 in https://github.com/khiga8/github-a11y/pull/7
    • Don't run background.js outside of github.com host url exact match by @khiga8 in https://github.com/khiga8/github-a11y/pull/8
    • Fix bug where headings get duplicated by @khiga8 in https://github.com/khiga8/github-a11y/pull/10

    Enhancements

    • Fix heading position styles to prevent overlap and extract styles into CSS file by @khiga8 in https://github.com/khiga8/github-a11y/pull/9

    Full Changelog: https://github.com/khiga8/github-a11y/compare/v0.2...v0.3

    Source code(tar.gz)
    Source code(zip)
  • v0.2(Feb 12, 2022)

    What's Changed

    • Move heading to end for readability by @khiga8 in https://github.com/khiga8/github-a11y/pull/3
    • Fix issue of extension not running until page load by @khiga8 in https://github.com/khiga8/github-a11y/pull/5

    Full Changelog: https://github.com/khiga8/github-a11y/commits/v0.2

    Source code(tar.gz)
    Source code(zip)
Owner
Kate Higa
Kate Higa
๐Ÿ Simple and complete React DOM testing utilities that encourage good testing practices.

React Testing Library Simple and complete React DOM testing utilities that encourage good testing practices. Read The Docs | Edit the docs Table of Co

Testing Library 17.3k Jan 4, 2023
a react-based framework that provides accessibility, modularity, responsiveness, and theming in a tidy package

Grommet: focus on the essential experience Documentation Visit the Grommet website for more information. Support / Contributing Before opening an issu

grommet 8.1k Jan 5, 2023
A reusable react hook that preserves a components semantic accessibility to create a visual block link.

useAccessibleBlockLink is a reusable react hook that preserves a components semantic accessibility to create a visual block link. This hook supports multiple links within the same block.

Wayfair Tech โ€“ Incubator 4 Nov 28, 2022
This solution aims to simplify the implementation of login using SPID or similar services, such as CIE and eIDAS

This solution aims to simplify the implementation of login using SPID or similar services, such as CIE and eIDAS. It supports both the use of ADFS and B2C as identity federators.

Microsoft 19 Dec 2, 2022
A Chrome T-Rex game remake using javascript and threejs. Online demo: https://rossning92.github.io/t-rex

T-Rex Game in 3D A Chrome T-rex game remake using javascript and threejs. Build the code Make sure you have node 12+ installed: https://nodejs.org/en/

null 79 Dec 29, 2022
๐Ÿ’ธ 1st place at Hack The Job 2022 - A chrome extension that automatically tracks purchases and budgets, alerting users if they go over their spending limits and allowing them to download PDF reports.

?? Won 1st place overall @ Hack the Job! ?? A browser extension for keeping on top of your finances. This project will keep track of the purchases you

Harsh Topiwala 11 Oct 4, 2022
:art: Color Pickers from Sketch, Photoshop, Chrome, Github, Twitter & more

React Color 13 Different Pickers - Sketch, Photoshop, Chrome and many more Make Your Own - Use the building block components to make your own Demo Liv

case 11.2k Jan 6, 2023
Github-ci-cd-react - I followed CI/CD course from codedamn to learn how to implement github actions in a project, in this practical lesson with codedamn am using ReactJS

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Okechukwu Somtochukwu 1 Jan 2, 2022
Recoil is an experimental state management library for React apps. It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.

Recoil ยท Recoil is an experimental set of utilities for state management with React. Please see the website: https://recoiljs.org Installation The Rec

Facebook Experimental 18.2k Jan 8, 2023
A free book that talks about design patterns/techniques used while developing with React.

React in patterns ?? A free book that talks about design patterns/techniques used while developing with React. Book GitBook Web PDF Mobi ePub Translat

Krasimir Tsonev 12.3k Jan 7, 2023
Developer Dao FM is where you can chill and listen to Lofi music while building cool stuff!

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Developer DAO 9 Jul 21, 2022
An experimental hover effect, where a content preview is shown while a mini map indicates the position of the cursor.

Hover Preview Effect with Mini Map An experimental hover effect, where a content preview is shown while a mini map indicates the position of the curso

Codrops 27 Dec 29, 2022
This is my portfolio GitHub clone website. The frontend is build using NextJS and TailwindCSS.

Github Clone Portfolio Website Tech Stack used: NextJS Tailwind CSS The contact form in this website is connected to Notion. If you want to integrate

Unnati Bamania 22 Oct 5, 2022
An implementation of GitHub's Primer Design System using React

Primer React A React implementation of GitHub's Primer Design System Documentation Our documentation site lives at primer.style/react. You'll be able

Primer 2.2k Dec 26, 2022
Generate GitHub repositories timeline using a username

ReposTimeline About ReposTimeline is a NextJS app that helps visualize your repositories in a timeline you can easily share. Installation git clone ht

Nazif Barassounon 73 Dec 31, 2022
A react component available on npm to easily link to your project on github and is made using React, TypeScript and styled-components.

fork-me-corner fork-me-corner is a react component available on npm to easily link to your project on github and is made using React, TypeScript and s

Victor Dantas 9 Jun 30, 2022
Create posts for ubccsss.org using the GitHub REST API

content manager for ubccsss.org Create posts for ubccsss.org using the GitHub REST API Installation $ git clone [email protected]:ubccsss/content-manager

UBC Computer Science Student Society 2 Sep 15, 2022
Gnome Shell extension to provide a flexible applications dock (WIP).

Flexi Dock (WIP) Gnome Shell extension to provide a flexible applications dock. Installation The easiest way to install this extension is via the offi

Hardpixel 3 Aug 29, 2022
GitHub action to get notification whenever vaccine slot is availble in cowin portal :tada:

Covid Vaccine availability notifier Setup Fork this repo Update the config at src/config.js Delete the db file src/db.json module.exports = { // opt

Ameer Jhan 32 Jul 27, 2022