Skip to content
This repository has been archived by the owner on Aug 24, 2023. It is now read-only.

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
SSen committed Sep 13, 2020
1 parent 8cba1c9 commit 5a82eb8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

# 목표

1. 예제로 주어진 Material-UI의 Color Palette의 WCAG Contrast Ratio 접근성을 계산합니다.
2. Git Pre-Commit Hook을 사용해서 Report를 작성합니다. (CI 상에서는 Report 파일들의 저장 문제 등 Back-End 비용이 발생하므로 Pre-Commit 상에서 진행합니다.)
3. CI (Github Actions) 에 PR이 발생하면 `master` Branch의 Report와 PR의 Report를 비교해서 Score 증감을 계산합니다.
4. Report의 증감이 있는 경우 PR에 Comment를 자동으로 달아줍니다.
1. 예제로 주어진 [Material-UI Color Palette](https://github.com/iamssen/wcag-contrast-validation-example/blob/master/example/src/style/theme.ts)[WCAG Contrast Ratio 접근성을 계산](https://github.com/iamssen/wcag-contrast-validation-example/blob/master/example/src/%40ssen/anlayze-wcag-contrast/analyzeWCAGContrast.tsx)합니다.
2. Git [Pre-Commit Hook을 사용해서 Report를 작성](https://github.com/iamssen/wcag-contrast-validation-example/blob/master/example/scripts/validate-wcag-contrast.tsx)합니다. (CI 상에서는 Report 파일들의 저장 문제 등 Back-End 비용이 발생하므로 Pre-Commit 상에서 진행합니다.)
3. [CI의 `master` Branch Commit이 발생](https://github.com/iamssen/wcag-contrast-validation-example/blob/master/.github/workflows/validate.yml#L54)하면 [Report Image를 Commit에 Comment로 보여줍니다.](https://github.com/iamssen/wcag-contrast-validation-example/blob/master/example/scripts/validate-master-commit.ts)
4. [CI에 Pull Request가 발생](https://github.com/iamssen/wcag-contrast-validation-example/blob/master/.github/workflows/validate.yml#L58)하면 [PR Base의 Report와 PR의 Report를 비교해서 Score 증감을 계산한 다음 Pull Request에 Comment로 보여줍니다.](https://github.com/iamssen/wcag-contrast-validation-example/blob/master/example/scripts/validate-pull-request.ts)

# Previews



# TODOs

- [x] WCAG Contrast Ratio Report
Expand Down
2 changes: 1 addition & 1 deletion example/snapshots/wcag-contrast/preview.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"scores":{"primary":{"background":"Fail","paper":"Fail"},"secondary":{"background":"AA Large","paper":"Fail"},"error":{"background":"AA Large","paper":"AA Large"},"warning":{"background":"AAA","paper":"AA"},"info":{"background":"AA","paper":"AA Large"},"success":{"background":"AA","paper":"AA"}},"preview":"preview.svg"}
{"scores":{"primary":{"background":"AAA","paper":"AAA"},"secondary":{"background":"AAA","paper":"AA"},"error":{"background":"AA Large","paper":"AA Large"},"warning":{"background":"AAA","paper":"AA"},"info":{"background":"AA","paper":"AA Large"},"success":{"background":"AA","paper":"AA"}},"preview":"preview.svg"}
2 changes: 1 addition & 1 deletion example/snapshots/wcag-contrast/preview.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions example/src/style/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export const dark: Theme = createMuiTheme({
paper: '#333333',
},
primary: {
main: '#2b4158',
main: '#90caf9',
},
secondary: {
main: '#c14473',
main: '#f48fb1',
},
error: {
main: '#f44336',
Expand Down

1 comment on commit 5a82eb8

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WCAG CONTRAST RATIO

Please sign in to comment.