Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
2c49031
Updated to latest given by OG team
Aug 19, 2024
35a7a3d
Implemented html validator
Aug 19, 2024
2e32a47
Fixed display not rendering
Aug 20, 2024
c1ee533
Added more comprehensive W3C and WHATWG validation and initial functi…
Aug 27, 2024
ea3ae89
Removed API token (exposed token already reset)
marcojalenyu Aug 27, 2024
0fc4881
Fixed placement of error messages and removed redundancies
marcojalenyu Aug 28, 2024
0615e37
Included alt-text generator in diagnosis if W3C
marcojalenyu Aug 28, 2024
b5a9c29
Updated the package, gitignore, and commented out debugging
marcojalenyu Aug 29, 2024
c585dc4
Resolved promise of alt-text
marcojalenyu Aug 29, 2024
a9b444e
Update text replacement
nicoledaphneong Aug 29, 2024
02d0818
Update text replacement
nicoledaphneong Aug 29, 2024
40b299f
Added a way to prevent duplicates from being added
marcojalenyu Aug 29, 2024
7a360ce
Edited the alt-text message sent to users
marcojalenyu Aug 30, 2024
d48cc7f
Added a color contrast checker for HTML tags
marcojalenyu Aug 31, 2024
8dbe471
Inserted the color checker to the logic of the AB.LY functions
marcojalenyu Aug 31, 2024
86b7f41
Added contrast results as diagnosis
marcojalenyu Aug 31, 2024
ee462b6
Updated the location for comments
marcojalenyu Sep 2, 2024
8910360
Added generic suggestion for contrast
marcojalenyu Sep 2, 2024
f43a027
Made sideview renderable again
marcojalenyu Sep 2, 2024
0af779e
Separated sideview to their own files
marcojalenyu Sep 3, 2024
c28913b
Refactored the html output
marcojalenyu Sep 3, 2024
3ef773a
Added sorting for diagnostics
marcojalenyu Sep 3, 2024
7144509
Fixed the scoring (was flipped)
marcojalenyu Sep 3, 2024
9bdd7d3
Removed console.logs and fixed some mapping
marcojalenyu Sep 3, 2024
9be38f9
Added an html viewer for debugging
marcojalenyu Sep 3, 2024
2d5529b
Fixed the display of certain errors
marcojalenyu Sep 3, 2024
7504f13
Commented out debugger + fixed messages treated as tags
marcojalenyu Sep 3, 2024
c1c1549
Fixed some display issues
marcojalenyu Sep 4, 2024
0e2aad2
Replaced if-conditions for links to a dict
marcojalenyu Sep 4, 2024
908fba7
Made those with 2+ rules separate in sideview
marcojalenyu Sep 4, 2024
b90c2de
Separated color contrast in its own category
marcojalenyu Sep 4, 2024
aa88d08
Forgot that img has no closing tag
marcojalenyu Sep 4, 2024
1ce57fe
Moved the W3C and WHATWG dict to separate files
marcojalenyu Sep 5, 2024
63fd120
Updated the W3C and WHATWG files
marcojalenyu Sep 5, 2024
5dce3c7
Separated all WCAG 1.3.1 regex to one file
marcojalenyu Sep 5, 2024
a84e0cd
Separated all WCAG 1.3.4 regex to one file
marcojalenyu Sep 5, 2024
3c629c5
Separated all WCAG 1.3.5 regex to one file
marcojalenyu Sep 5, 2024
537f1d5
Separated all WCAG 1.4.4 regex to one file
marcojalenyu Sep 5, 2024
b5d52bf
Renamed the folders of the dicts
marcojalenyu Sep 5, 2024
aaa7371
Fixed error in pattern135b's name
marcojalenyu Sep 5, 2024
131c8b6
Separated all WCAG 2.1.1 regex to one file
marcojalenyu Sep 5, 2024
e877284
Separated all WCAG 2.5.3 regex to one file
marcojalenyu Sep 5, 2024
c976294
Separated all WCAG 4.1.3 regex to one file
marcojalenyu Sep 5, 2024
57ca75d
Refactored the server.js to move the wcag regex
marcojalenyu Sep 5, 2024
6355b76
Refactored to move img-caption to helper folder
marcojalenyu Sep 5, 2024
9dbb3eb
Renamed dicts for better readability
marcojalenyu Sep 7, 2024
545762c
Fixed the placement of comments
marcojalenyu Sep 9, 2024
af50aae
Updated the "arafed" removal
marcojalenyu Sep 9, 2024
f9b4f86
Moved the processing of W3C in separate file
marcojalenyu Sep 9, 2024
549f215
Moved the processing of WHATWG in separate file
marcojalenyu Sep 9, 2024
14c37b3
Moved countAttributes to a separate file
marcojalenyu Sep 9, 2024
a261956
Refactored server.js
marcojalenyu Sep 9, 2024
4fd8753
Update img-caption.js
marcojalenyu Sep 9, 2024
43fcba6
Added additional error check for image not found
marcojalenyu Sep 9, 2024
360d4c2
Moved color contrast push to diagnostics to separate
marcojalenyu Sep 16, 2024
8a51ae2
Updated server.js with moved contrast add
marcojalenyu Sep 16, 2024
cb36a40
Refactored files
marcojalenyu Sep 16, 2024
a2e7edd
Added a loading page on sideview
marcojalenyu Sep 17, 2024
1f71bf7
Implemented loading screen to extension
marcojalenyu Sep 17, 2024
7fd6a3b
Part of the previous commit
marcojalenyu Sep 17, 2024
8e97f3c
Added an initial page for sideview
marcojalenyu Sep 17, 2024
0cc4923
Updated files to reflect new index
marcojalenyu Sep 17, 2024
f7224ab
Included implementation of new index
marcojalenyu Sep 17, 2024
e79a2eb
Updated loading UI
marcojalenyu Sep 17, 2024
6fc3d70
Update color-contrast.js
marcojalenyu Sep 17, 2024
bf18664
Added links to the lines in the sideview UI
marcojalenyu Sep 19, 2024
65d358e
Implemented go-to line links logic
marcojalenyu Sep 19, 2024
423e5b2
Fixed color contrast warning placement
AkimFA Jan 24, 2025
4ba6418
Change bgColor algorithm
AkimFA Jan 24, 2025
8895505
Better check for a text's index in an element
AkimFA Jan 27, 2025
7ba2497
More exports for test
AkimFA Jan 28, 2025
26925d1
Small test support fixes
AkimFA Jan 28, 2025
fec6460
Fixed exports for unit testing
AkimFA Jan 28, 2025
705fe2e
Merge branch 'Color-Warning-Placement' into updated
AkimFA Jan 28, 2025
94fc68b
Changes to checkDocumentContrast
AkimFA Jan 30, 2025
2000214
commenting
AkimFA Jan 31, 2025
7838cb4
Removed checkContrastRatio
AkimFA Jan 31, 2025
fecef80
Testing Color suggestion
AkimFA Jan 31, 2025
eb007cc
Initial color suggestion implementation
AkimFA Jan 31, 2025
3c84124
Small edits to suggestion
AkimFA Jan 31, 2025
ca0c288
fix comments
AkimFA Jan 31, 2025
4bd3fb1
Adjusted index of warning
AkimFA Feb 3, 2025
4dbf807
Fixed warning placement and removed parts of parseColor function
AkimFA Feb 4, 2025
00eab10
Change return format
AkimFA Feb 10, 2025
db0169c
Merge branch 'updated' into color-suggestion
AkimFA Feb 11, 2025
56e50db
Added color scheme suggestion in sidebar
AkimFA Feb 14, 2025
327b0f0
Added a duplicate check for color scheme
AkimFA Feb 14, 2025
06a28ac
Fixed text color of color scheme
AkimFA Feb 14, 2025
64d37f6
Fixed color scheme UI, added checks, and reformatted data
AkimFA Feb 17, 2025
21fe918
Moved data formatting for colorscheme
AkimFA Feb 17, 2025
a2492fc
Added text for limitations
AkimFA Feb 20, 2025
d160ae4
Changed message
AkimFA Feb 24, 2025
a5b6674
Small background fix
AkimFA Feb 26, 2025
c9e4534
Getting css stylesheet case
AkimFA Mar 3, 2025
8e66c0d
Added External stylesheet check
AkimFA Mar 3, 2025
dcab150
Small check for AAA level in text color suggestion
AkimFA Mar 6, 2025
8b110a8
Update color-contrast.js
AkimFA Mar 9, 2025
f0bcc51
Added multiple external sheet support
AkimFA Mar 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ client/out/extension.js.map
server/out/server.js.map
node_modules
client/server
.vscode-test
.vscode-test
.env
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"typescript.tsc.autoDetect": "off",
"typescript.preferences.quoteStyle": "single",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
}
}
Binary file added ABLY-1.2.0.vsix
Binary file not shown.
98 changes: 60 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,60 @@
# LSP Example

Heavily documented sample code for https://code.visualstudio.com/api/language-extensions/language-server-extension-guide

## Functionality

This Language Server works for plain text file. It has the following language features:
- Completions
- Diagnostics regenerated on each file change or configuration change

It also includes an End-to-End test.

## Structure

```
.
├── client // Language Client
│ ├── src
│ │ ├── test // End to End tests for Language Client / Server
│ │ └── extension.ts // Language Client entry point
├── package.json // The extension manifest.
└── server // Language Server
└── src
└── server.ts // Language Server entry point
```

## Running the Sample

- Run `npm install` in this folder. This installs all necessary npm modules in both the client and server folder
- Open VS Code on this folder.
- Press Ctrl+Shift+B to start compiling the client and server in [watch mode](https://code.visualstudio.com/docs/editor/tasks#:~:text=The%20first%20entry%20executes,the%20HelloWorld.js%20file.).
- Switch to the Run and Debug View in the Sidebar (Ctrl+Shift+D).
- Select `Launch Client` from the drop down (if it is not already).
- Press ▷ to run the launch config (F5).
- If you want to debug the server as well, use the launch configuration `Attach to Server`
- In the [Extension Development Host](https://code.visualstudio.com/api/get-started/your-first-extension#:~:text=Then%2C%20inside%20the%20editor%2C%20press%20F5.%20This%20will%20compile%20and%20run%20the%20extension%20in%20a%20new%20Extension%20Development%20Host%20window.) instance of VSCode, open a document in 'plain text' language mode.
- Type `j` or `t` to see `Javascript` and `TypeScript` completion.
- Enter text content such as `AAA aaa BBB`. The extension will emit diagnostics for all words in all-uppercase.
# AB.LY Extension

Thank you for installing the AB.LY Extension.
This is an extension developed by **Bryan Camarillo**, **Keil Finez**, **Pamela Olalia**, and **Kenneth Tan** aimed to help developers like yourself make more accessible code.

## What is accessible code?

We define accessible code as code that follows the existing _Web Content Accessibility Guidelines 2.1_ (WCAG 2.1) which allows users with a wide range of abilities and disabilities to use websites and web apps without excessive dependence on third party workarounds. Developing accessible code helps all users of the internet to use, navigate, and interact with sites and apps by making them more structured and properly labeled.

## How do people with disabilities use, navigate, and interact with sites and apps?

People with disabilities, particularly those with impaired vision, do these tasks with the help of assistive tools like screen-readers—which help these people dictate which part of a website they're in, as well as what it contents are not just visually but structurally. What does that mean? If sites and apps are coded with accessibility in mind, people with disabilities are guided with what contents are available, whether it may be buttons, headers, forms, and images.

## What does this extension do?

Now that you've installed this extension, this will help you spot inaccessible code as its purpose is to _lint_ or mark a particular line of code and offer you suggestions as to how you can make them accessible. The features provided in this extension will hopefully guide you throughout your project—in terms of accessibility.

## What does this look like?

There are two features that you want to focus your attention on when using this extension. The first feature that this extension provides is linting where it marks or underlines your inaccessible code, while the second one is a sidebar that keeps track of the number of accessibility violations you have as well as a scoring feature that is based on said number.

Since you've successfully installed this extension, let's introduce what your environment should look like.

!["sample environment in vscode"](https://i.ibb.co/mXjXDBk/ably01.png)

Figure 1. Sample environment in VSCode

The current page shows an existing HTML with pre-written _inaccessible_ code. Let's mark each section that needs attention.

!["labeled sections in the sample environment"](https://i.ibb.co/php7Kz3/ably02.png)

Figure 2. Labeled sections in the sample environment

As seen inside the purple box, linted lines—those with accessibility violations—are marked by a yellow underline. This is then related to the warning report at the bottom, marked with a blue box, showing which **accessibility guideline/s are violated**, which **line and column** do they occur (indicated by the lint), and a **suggestion** on how to resolve the violation. Then finally, on the left-hand side, is a sidebar that shows the number of inaccessible code, lists all suggestions, and displays the code's overall accessibility score.

### Linting

!["lint example and its corresponding warning"](https://i.ibb.co/HNQpzSW/ably03.png)

Figure 3. Linted code with its corresponding warning

This is what linting looks like. A yellow jagged underline marks each line of code that violates the accessibility guidelines. Each line corresponds to a warning that's indicated below. These warnings occur in the same order as the violated code, meaning from top to bottom.

### AB.LY Sidebar

!["ab.ly sidebar contents"](https://i.ibb.co/6y0zY2Y/ably04.png)

Figure 4. AB.LY sidebar

This is what the sidebar looks like. At the top-right corner, is the code's overall accessibility score percentage. Then, the rest of the sidebar is used to display all suggestions which are segregated into four categories based on WCAG 2.1: Perceivable, Operable, Understandable, and Robust.

## Others

This extension was built upon Microsoft's implementation of the Language Server Protocol. This implementation allows the communication of the client side (developer side) and the server side (backend side) to allow the two aforementioned features to work.

Here is the documented sample code in which this extension was based on, as well as all related technical information regarding its implementation: https://code.visualstudio.com/api/language-extensions/language-server-extension-guide

## Disclaimer

This extension is accomplished in accordance to the creators' thesis submission. Note that this may have incomplete features that is not accounted for. This is to mainly provide an idea that helping developers through real-time assistance as well as learning may be provided through this extension, and is subject for more further improvements when possible.
Binary file added assets/ably128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ably16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ably48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
220 changes: 169 additions & 51 deletions client/out/extension.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading