Skip to content

Commit

Permalink
Merge pull request #811 from vrk-kpa/develop
Browse files Browse the repository at this point in the history
[Release] 13.0.0
  • Loading branch information
riitasointi authored Dec 11, 2023
2 parents 3a0799f + f08f8e3 commit bdcd334
Show file tree
Hide file tree
Showing 210 changed files with 37,369 additions and 12,700 deletions.
28 changes: 14 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,39 @@ commands:
command: node --version
- restore_cache: # special step to restore the dependency cache
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/
name: Restore Yarn Package Cache
name: Restore NPM Package Cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- npm-packages-{{ checksum "package-lock.json" }}
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
command: npm ci
- save_cache: # special step to save the dependency cache
name: Save Yarn Package Cache
key: yarn-packages-{{ checksum "yarn.lock" }}
name: Save NPM Package Cache
key: npm-packages-{{ checksum "package-lock.json" }}
paths:
- ~/.cache/yarn
- ~/.cache/npm
build:
steps:
- run: yarn styleguide:build
- run: npm run styleguide:build
test:
steps:
- run:
name: Install JUnit coverage reporter
command: yarn add --dev jest-junit
command: npm install --dev jest-junit
- run:
name: Install TSLint JUnit Formatter
command: yarn add --dev tslint-junit-formatter
command: npm install --dev tslint-junit-formatter
- run: # run tests
name: Run tests with JUnit as reporter
command: yarn test -- --ci --runInBand --reporters=default --reporters=jest-junit
command: npm run test -- --ci --runInBand --reporters=default --reporters=jest-junit
environment:
JEST_JUNIT_OUTPUT: 'reports/junit/js-test-results.xml'
- run:
name: 'JavaScript and TypeScript Linter'
command: yarn eslint --config .eslintrc src/**/*.tsx -- --format junit -o reports/junit/js-lint-results.xml
command: npx eslint --config .eslintrc src/**/*.tsx --format junit -o reports/junit/js-lint-results.xml
- run:
name: 'Prettier check'
command: yarn prettier:check
command: npm run prettier:check
- store_artifacts: # special step to save test results as as artifact
# Upload test summary for display in Artifacts: https://circleci.com/docs/2.0/artifacts/
path: reports/junit
Expand Down Expand Up @@ -78,14 +78,14 @@ jobs:
- checkout_and_cache
- build
- pre_deploy
- run: yarn deploy
- run: npm run deploy
deploy_dev:
executor: build-executor
steps:
- checkout_and_cache
- build
- pre_deploy
- run: yarn deploy-dev
- run: npm run deploy-dev

workflows:
version: 2
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @LJKaski @riitasointi @Riippi @jenkrisu
* @LJKaski @riitasointi
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
*.log
0-stage
yarn.lock

# build output
dist
Expand All @@ -14,7 +15,6 @@ styleguide

# dependencies
node_modules
package-lock.json

# editors
.idea
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

yarn pre-commit
npm run pre-commit
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

yarn pre-push
npm run pre-push
96 changes: 96 additions & 0 deletions .styleguidist/accessibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
Our goal is to be WCAG 2.1 (and eventually WCAG 2.2) compliant at an AA level for all components. Additionally, components are tested in commonly used user agents and with common assistive technology. We also aim to support Windows High Contrast mode. Based on our testing, almost all components fulfill these goals, with a few [outstanding issues](./#Accessibility?=known-issues).

Using the Suomi.fi component library does not automatically make your project accessible, but it will hopefully significantly reduce the amount of work you need to do to provice an accessible user experience. It is important to read the documentation for each component carefully.

* [Known issues](./#/Accessibility?id=known-issues)
* [Our acccessibility checklist](./#/Accessibility?id=our-accessibility-checklist)
* [On the tests](./#/Accessibility?id=on-the-tests)
* [Automated](./#/Accessibility?id=automated)
* [Visual inspection](./#/Accessibility?id=visual-inspection)
* [Keyboard](./#/Accessibility?id=keyboard)
* [Pointer devices](./#/Accessibility?id=pointer-devices)
* [Adaptability](./#/Accessibility?id=adaptability)
* [Code inspection](./#/Accessibility?id=code-inspection)
* [Windows High Contrast Mode](./#/Accessibility?id=windows-high-contrast-mode)
* [Motion](./#/Accessibility?id=motion)
* [Screen reader tests and support](./#/Accessibility?id=screen-reader-tests-and-support)
* [Other assistive technology](./#/Accessibility?id=other-assistive-technology)

## Known issues

* **MultiSelect** and **SingleSelect**: Options are not read out by VoiceOver on macOS when using Safari.
* **MultiSelect** and **SingleSelect**: The selected state of an option is not read out by JAWS.
* **Textarea** and **TextInput**: Success/error states are not distinguishable without colour.
* **Breadcrumb**: Line-height does not adjust when only text is resized 200%.
* **Dropdown**: Line-height does not adjust when only text is resized 200%.
* **DateInput**: Disabled dates are not distuinguishable from non-disabled ones in Windows High Contrast mode.

## Our accessibility checklist

### On the tests

This checklist reflects the current features of the component library. It is not meant to be a comprehensive WCAG checklist. For example, we do not test for Page Titled (WCAG-criterion 2.4.2), because the component library only includes invividual components, not pages. Similarly, we do not have a test for Captions (WCAG-criterion *2.2) or other media-related criteria, because there is no video content within our components. You should always do your own accessibility testing. A good start is the <a href="https://webaim.org/standards/wcag/checklist">WebAIM WCAG 2 Checklist</a>.

### Automated

* No errors reported by axe Devtools.

### Visual inspection

* Text contrast is at least 4.5:1 in each component state
* The contrast of essential non-text information is at least 3:1 with its surrroundings.
* Colour is not used as the only way to convey information.

### Keyboard and pointer device

* All functionality can be accessed with keyboard
* Keyboard focus is clearly visible
* The keyboard focus order within a component is logical
* Focusing a component or its sub-component does not cause a change of context.
* Component has no single-character shortcuts.

### Pointer devices

* Focusing or hovering a component or its sub-component does not cause a change of context.
* No actions are performed using the pointer down-event, unless it is native functionality defined by the user-agent.

### Adaptability

* Text resizing to 200% does not cause loss of information or overlapping content. **Must** support full-page zoom. **Should** support text-only zoom.
* Changing text settings according to WCAG *4.12 does not cause loss of information or overlap.
* Zooming to 400% in a 1280px wide window does not cause horizontal scrolling, loss or overlap of information.
* Content is not limited to a specific device orientation.

### Code inspection

* Lists are marked using the correct HTML elements.
* Correct semantic elements are used where appropriate (headings, lists)
* For components with text in a different language than the surrounding text, check that the language can be programmatically evaluated.

### Windows High Contrast mode

* Components and their different states are distinguishable when running in Windows High Contrast Mode.
* Keyboard focus is visible when running in Windows High Contrast Mode.

### Motion

* If the component has animations, check that they respect the Reduced Motion platform setting.

### Screen reader tests and support

Officially supported browser / screen reader combinations:

| Operating system | Browsers | Screen reader |
| ---------------- | --------------------- | ------------- |
| macOS | Safari, Chrome, Edge | VoiceOver |
| Windows | Chrome, Firefox, Edge | NVDA |
| iOS | Safari | VoiceOver |
| Android | Chrome | TalkBack |

Additionally, components are tested using Narrator and Edge in Windows, the latest JAWS version and Chrome on Windows, and Orca and Firefox on Linux.

All content should be available in reading mode, and all interactive functionality available in focus mode. Commands vary in different screen readers, and support for different HTML and ARIA features also varies and can depend both on what the accessibility tree of the browser exposes, as well as the screen reader itself.

### Other assistive technology

When appropriate, components are tested using Voice Control on macOS and voice access on Windows.
2 changes: 2 additions & 0 deletions .styleguidist/assets/v12.0.3/build/bundle.b9764a19.js

Large diffs are not rendered by default.

Loading

0 comments on commit bdcd334

Please sign in to comment.