Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make docs site (jrnl.sh) fully meet Web Content Accessibility Guidelines (WCAG) 2.1 #1105

Merged
merged 14 commits into from
Dec 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 24 additions & 3 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ on:
branches: [ develop, release ]
paths:
- 'docs/**'
- 'docs_theme/**'
- 'mkdocs.yml'
- 'readthedocs.yml'
- '.github/workflows/docs.yaml'
pull_request_target:
branches: [ develop ]
paths:
- 'docs/**'
- 'docs_theme/**'
- 'mkdocs.yml'
- 'readthedocs.yml'
- '.github/workflows/docs.yaml'

jobs:
accessibility:
Expand Down Expand Up @@ -47,14 +51,31 @@ jobs:
run: poetry run mkdocs serve &

- name: Accessibility testing (Pa11y)
run: poetry run .github/workflows/pa11y.sh
env:
site_url: http://127.0.0.1:8000
exit_code: 0
run: |
set +e

poetry run mkdocs build
mkdir -p "reports"

printf -- 'scanning: /\n'
./node_modules/.bin/pa11y "$site_url" --reporter junit > "reports/root.xml" || exit_code=2

for file in $(poetry run xq '.urlset.url[].loc' site/sitemap.xml -r | sed -r 's!https://jrnl.sh/(.*?)/$!\1!'); do
printf -- 'scanning: /%s\n' "$file"
./node_modules/.bin/pa11y "$site_url/$file" --reporter junit > "reports/$file.xml" || exit_code=2
done

exit $exit_code

- name: Upload Unit Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: Unit Test Results (pa11y)
path: reports/pa11y/*.xml
path: reports/*.xml

publish-test-results:
if: success() || failure()
Expand All @@ -70,7 +91,7 @@ jobs:

- name: Publish Unit Test Results
uses: EnricoMi/[email protected]
if: always()
if: success() || failure()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
check_name: Unit Test Results
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/pa11y.sh

This file was deleted.

79 changes: 0 additions & 79 deletions docs/assets/highlight.css

This file was deleted.

204 changes: 0 additions & 204 deletions docs/assets/theme.css

This file was deleted.

5 changes: 3 additions & 2 deletions docs/formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ This format is configurable through these values from your config file (see
| This is the sample body text of the first sample entry.

2020-07-01 20:00 This is the second sample entry
| This is the sample body text of the second sample entry, but this one has a @tag.
| This is the sample body text of the second sample entry, but
| this one has a @tag.

2020-07-02 09:00 This is the third sample entry
| This is the sample body text of the third sample entry.
Expand Down Expand Up @@ -119,7 +120,7 @@ jrnl --format json

JSON is a very handy format used by many programs and has support in nearly every
programming language. There are many things you could do with JSON data. Maybe you could
use [`jq`](https://github.com/stedolan/jq) to filter through the fields in your journal.
use `jq` ([project page](https://github.com/stedolan/jq)) to filter through the fields in your journal.
Like this:

``` sh
Expand Down
4 changes: 2 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ should be created and whether you wish to encrypt it.

To make a new entry, just type

``` sh
jrnl yesterday: Called in sick. Used the time to clean the house and spent 4h on writing my book.
``` text
jrnl yesterday: Called in sick. Used the time to clean, and spent 4h on writing my book.
```

and hit return. `yesterday:` will be interpreted as a time stamp.
Expand Down
Loading