Skip to content

Commit

Permalink
Typos and Spelling corrections (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianteeman authored Dec 1, 2023
1 parent 0abf90f commit d3c5f2a
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 53 deletions.
36 changes: 18 additions & 18 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Installation Guide

Purple hats is provided as a portable distribution which minimises installation steps required for Windows and Mac.
Purple hats is provided as a portable distribution which minimises installation steps required for Windows and Mac.

### About Purple hats
Purple hats is a customisable, automated accessibility testing tool that allows software development teams to find and fix accessibility problems to improve persons with disabilities (PWDs) access to digital services.
Expand All @@ -14,17 +14,17 @@ Purple hats is a customisable, automated accessibility testing tool that allows
### Windows
<details>
<summary>Click here for Windows setup instructions</summary>

#### Download Portable Copy
* Download and extract latest [purple-hats-portable-windows.zip](https://github.com/GovTechSG/purple-hats/releases/latest/download/purple-hats-portable-windows.zip).
* Tip: To extract files, right-click the Compressed zip file and click "Extract All…" in the context menu.

#### Run Purple hats
* Navigate to the folder containing purple-hats-portable.
* Navigate to the folder containing purple-hats-portable.
* Double-click `hats_shell.cmd` (Windows Command Script file).
<img width="480" alt="Screenshot of Windows Explorer with hats_shell.cmd selected" src="https://user-images.githubusercontent.com/2021525/225506018-9f7a6684-ac14-4a69-a4f2-4d1a67a068c4.png">

* A Windows Command Prompt window should open with contents as illustrated below. `hats_shell` will autmatically prepare your system to run Purple hats.
* A Windows Command Prompt window should open with contents as illustrated below. `hats_shell` will automatically prepare your system to run Purple hats.
```
hats Shell - Created By younglim - NO WARRANTY PROVIDED
================================================================
Expand All @@ -40,7 +40,7 @@ INFO: Set path to purple-hats for this session
PS C:\Users\username\Downloads\purple-hats-portable-windows>
```


* Type in the following commands into the window. The following commands will navigate your Command Prompt window to the `purple-hats` sub-directory and initiate a scan
```
Expand All @@ -67,26 +67,26 @@ PS C:\Users\username\Downloads\purple-hats-portable-windows\purple-hats> node in
```

* Follow the steps at [Features](https://github.com/GovTechSG/purple-hats#features) for more information on how to run a scan.

</details>

### MacOS
<details>
<summary>Click here for MacOS setup instructions</summary>

#### Download Portable Copy
* Download and extract [purple-hats-portable-mac.zip](https://github.com/GovTechSG/purple-hats/releases/latest/download/purple-hats-portable-mac.zip) version.
* Tip: To extract files in Mac, double-click on `purple-hats-portable-mac.zip` file, usually located at your Downloads folder. A new folder with the name `purple-hats-mac` will appear in Finder.

#### Run Purple hats
* Navigate to the folder `purple-hats-mac`, usually located at your Downloads folder.
* Navigate to the folder `purple-hats-mac`, usually located at your Downloads folder.
* Right-click `hats_shell.command`. Then click `Open` in the context menu.
<img width="480" alt="Screenshot of right-click hats_shell.command and Open" src="https://user-images.githubusercontent.com/2021525/225501586-2df8ba37-f58a-4d1f-b28c-e06865fec2b0.png">

* A prompt as follows will appear like below. Click `Open`.
* A prompt as follows will appear like below. Click `Open`.
<img width="240" alt="MacOS prompt for unidentified developer" src="https://user-images.githubusercontent.com/2021525/208457749-3a0a573d-5a6d-4905-b11e-c957d2073979.png">

* A Terminal window should open with contents as illustrated below. `hats_shell` will autmatically prepare your system to run Purple hats.
* A Terminal window should open with contents as illustrated below. `hats_shell` will automatically prepare your system to run Purple hats.
```
Last login: Thu Mar 16 10:48:05 on ttys002
/Users/username/Downloads/purple-hats-portable-mac/hats_shell.command ; exit;
Expand All @@ -100,18 +100,18 @@ INFO: Set path to Playwright cache for this session
INFO: Set symbolic link to ImageMagick
INFO: Set path to ImageMagick binaries
INFO: Removing com.apple.quarantine attributes for required binaries to run
username@hostname purple-hats-portable-mac %
username@hostname purple-hats-portable-mac %
```

* Type in the following commands into the window. The following commands will navigate your Terminal window to the `purple-hats` sub-directory and initiate a scan
```
```
cd purple-hats
node index
```

* You should then see your Terminal window updated with the following contents
```
username@hostname purple-hats-portable-mac % cd purple-hats
username@hostname purple-hats-portable-mac % cd purple-hats
username@hostname purple-hats % node index
┌────────────────────────────────────────────────────────────┐
│ Welcome to HATS Accessibility Testing Tool! │
Expand All @@ -120,9 +120,9 @@ username@hostname purple-hats % node index
│ Version: ░░░░░░ │
└────────────────────────────────────────────────────────────┘
? What would you like to scan today? (Use arrow keys)
❯ sitemap
website
custom flow
❯ sitemap
website
custom flow
```

* Follow the steps at [Features](https://github.com/GovTechSG/purple-hats#features) for more information on how to run a scan.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Other options:

#### Known Issues

If the custom flow fails to start, you might be runnning multiple versions of Playwright. Re-install Playwright:
If the custom flow fails to start, you might be running multiple versions of Playwright. Re-install Playwright:

1. On Windows, delete the folder `%USERPROFILE%\AppData\Local\ms-playwright` where `%USERPROFILE%` is typically located at `C:\Users\<username>`.
2. On MacOS, delete the folder `~/Library/Caches/ms-playwright` where `~` refers to `/Users/<username>`.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/mergeAxeResults.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ describe('test write results into HTML report', () => {
await writeHTML(allIssues, expectedStoragePath, htmlFilename);
expect(fs.readFile).toThrowError();
expect(spyConsoleLogger.mock.calls[0][0]).toEqual(
'An error has ocurred when generating the report, please try again.',
'An error has occurred when generating the report, please try again.',
);
expect(spySilentLogger.mock.calls[0][0].toString()).toEqual('(writeHTML) - Error');
});
Expand Down
6 changes: 3 additions & 3 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Usage: node cli.js -c <crawler> -d <device> -w <viewport> -u <url> OPTIONS`,
}
if (!validEmail(email)) {
printMessage(
[`Invalid emaill address. Please provide a valid email adress.`],
[`Invalid email address. Please provide a valid email address.`],
messageOptions,
);
process.exit(1);
Expand Down Expand Up @@ -314,11 +314,11 @@ const scanInit = async argvs => {
}
/* if sitemap scan is selected, treat this URL as a filepath
isFileSitemap will tell whether the filepath exists, and if it does, whether the
file is a sitemap */
file is a sitemap */
const finalFilePath = await isFileSitemap(argvs.url);
if (finalFilePath) {
argvs.isLocalSitemap = true;
argvs.finalUrl = finalFilePath;
argvs.finalUrl = finalFilePath;
if (process.env.VALIDATE_URL_PH_GUI) {
console.log('Url is valid');
process.exit(0);
Expand Down
2 changes: 1 addition & 1 deletion constants/cliFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const cliOptions = {
},
k: {
alias: 'nameEmail',
describe: `To personalise your experience, we will be collecting your name, email address and app usage data. Your information fully complies with GovTech’s Privacy Policy. Please provice your name and email address in this format "John Doe:[email protected]".`,
describe: `To personalise your experience, we will be collecting your name, email address and app usage data. Your information fully complies with GovTech’s Privacy Policy. Please provide your name and email address in this format "John Doe:[email protected]".`,
type: 'string',
demandOption: true,
},
Expand Down
16 changes: 8 additions & 8 deletions constants/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ export const isFileSitemap = async filePath => {
if (os.platform() === 'win32') {
filePath = filePath.match(/^file:\/\/\/([A-Z]:\/[^?#]+)/)?.[1];
} else {
filePath = filePath.match(/^file:\/\/(\/[^?#]+)/)?.[1];
filePath = filePath.match(/^file:\/\/(\/[^?#]+)/)?.[1];
}
}
}

if (!fs.existsSync(filePath)) {
return null;
return null;
}

const file = fs.readFileSync(filePath, 'utf8');
Expand Down Expand Up @@ -274,9 +274,9 @@ const requestToUrl = async (url, isNewCustomFlow) => {
const hasMetaRefresh = metaRefreshMatch && metaRefreshMatch[1];

if (redirectUrl != null && (hasMetaRefresh || !isNewCustomFlow)) {
res.url = redirectUrl;
res.url = redirectUrl;
} else {
res.url = url;
res.url = url;
}

if (hasMetaRefresh) {
Expand Down Expand Up @@ -792,8 +792,8 @@ export const getBrowserToRun = (preferredBrowser, isCli) => {
};
/**
* Cloning a second time with random token for parallel browser sessions
* Also To mitigate agaisnt known bug where cookies are
* overriden after each browser session - i.e. logs user out
* Also to mitigate against known bug where cookies are
* overridden after each browser session - i.e. logs user out
* after checkingUrl and unable to utilise same cookie for scan
* */
export const getClonedProfilesWithRandomToken = (browser, randomToken) => {
Expand Down
2 changes: 1 addition & 1 deletion constants/errorMeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
"30": {
"STATUS": "warning",
"CATEGORY": "code",
"RATIONALE": "Table of content items should point somwhere in the document."
"RATIONALE": "Table of content items should point somewhere in the document."
},
"31": {
"STATUS": "warning",
Expand Down
2 changes: 1 addition & 1 deletion static/ejs/partials/scripts/utils.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
return purpleAiQueryLabel;
})
.catch(err => {
console.error(`An error has occured while checking if ${ruleId} needs AI query`);
console.error(`An error has occurred while checking if ${ruleId} needs AI query`);
if (err.message === 'Network Error') {
return {
label: null,
Expand Down
38 changes: 19 additions & 19 deletions static/ejs/partials/styles/styles.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@import url('https://fonts.googleapis.com/css2?family=Viga&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap');
/* Boostrap CSS overrides */
/* Bootstrap CSS overrides */
#accessibility-site-report:root {
--bs-border-color: #b5c5ca;
--bs-border-radius: 0.25rem;
Expand Down Expand Up @@ -84,7 +84,7 @@
text-decoration: none;
}
/* End of Boostrap CSS overrides */
/* End of Bootstrap CSS overrides */
:root {
--must-fix-icon: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.1429 0H2.85714C1.27919 0 0 1.27919 0 2.85714V17.1429C0 18.7208 1.27919 20 2.85714 20H17.1429C18.7208 20 20 18.7208 20 17.1429V2.85714C20 1.27919 18.7208 0 17.1429 0Z' fill='%23D7260F'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.4292 9.99822V5.71251C11.4292 4.92353 10.7896 4.28394 10.0006 4.28394C9.21161 4.28394 8.57202 4.92353 8.57202 5.71251V9.99822C8.57202 10.7872 9.21161 11.4268 10.0006 11.4268C10.7896 11.4268 11.4292 10.7872 11.4292 9.99822ZM10.0006 12.8554C9.21202 12.8554 8.57202 13.4954 8.57202 14.2839C8.57202 15.0725 9.21202 15.7125 10.0006 15.7125C10.7892 15.7125 11.4292 15.0725 11.4292 14.2839C11.4292 13.4954 10.7892 12.8554 10.0006 12.8554Z' fill='white'/%3E%3C/svg%3E%0A");
Expand Down Expand Up @@ -356,8 +356,8 @@
display: none;
position: fixed;
z-index: 9999;
padding: 2rem;
left: 0;
padding: 2rem;
left: 0;
top: 0;
width: 100%;
height: 100%;
Expand All @@ -371,10 +371,10 @@
height: calc(100% - 4rem);
}
.lightbox-header {
display: flex;
display: flex;
flex-direction: row;
width: 100%;
align-items: center;
align-items: center;
margin-bottom: 2rem;
}
.lightbox-header button {
Expand All @@ -387,17 +387,17 @@
line-height: 1rem;
}
.lightbox-header h5 {
flex: 1;
flex: 1;
text-align: center;
color: #FFFFFF;
color: #FFFFFF;
font-weight: 700;
}
#lightbox-image {
object-fit: contain;
position: absolute;
object-fit: contain;
position: absolute;
width: 100%;
}
#pagesScannedModalToggle {
background-color: transparent;
color: #0047FA;
Expand All @@ -419,9 +419,9 @@
}
*/
#pagesScannedModal .modal-title {
width: 100%;
width: 100%;
word-wrap: break-word;
}
}
#pagesScannedModal .tab-content {
overflow-y: scroll;
max-height: 600px;
Expand All @@ -437,7 +437,7 @@
border-width: 2px !important;
}
#pagesScannedModal .nav-item {
padding: 0px;
padding: 0px;
border-bottom: none;
margin-bottom: -1px;
}
Expand All @@ -456,8 +456,8 @@
color: #333333;
text-align: center;
border-radius: 8px;
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
line-height: 1rem;
}
#pagesScannedModal .nav-link.active > .badge {
Expand Down Expand Up @@ -829,7 +829,7 @@
}
.rule-desc-text {
width: 100%;
width: 100%;
word-wrap: break-word;
}
Expand Down Expand Up @@ -1018,8 +1018,8 @@
border: 1px solid #97ADB5;
border-radius: 4px;
cursor: pointer;
background-color: #fff;
padding: 0.25rem;
background-color: #fff;
padding: 0.25rem;
line-height: 1rem;
}
Expand Down

0 comments on commit d3c5f2a

Please sign in to comment.