Read these guidelines before contributing code, documentation, bug reports, or feature requests.
Graupl is part of Accessible Ecosystem and helps people who may use the web differently than we do. Contributions should reflect the same care we put into making the web more accessible and friendly for everyone.
Accessibility also includes the people reading our code and documentation. Write plainly so someone just entering the field can follow your work, while giving experienced developers the detail they need to understand and maintain it.
By submitting any contribution, you take responsibility for its contents, whether you wrote it yourself or used assistance. Submit work you understand, have reviewed, and can explain.
Read the project instructions and accessibility policy before contributing. AI-assisted contributions must also follow the AI contribution policy.
We use GitHub to host code, track bugs and feature requests, and review pull requests. Use GitHub issues and pull requests so project discussions and decisions are available to contributors.
All code changes happen through pull requests.
1.x.Contributions must use the same license as the project, GNU General Public License v3.0 or later, identified as GPL-3.0-or-later in package.json.
Report bugs by opening a GitHub issue.
Include the following in your bug report:
Use Node.js 24, which is also used by the project workflows. Run npm install to install the development tools.
Run commands from the repository root. Graupl uses npm workspaces under packages/. Keep JavaScript component code in packages/core/src/js/ or the package that owns the component. Shared Sass lives in packages/core/src/scss/ and packages/core/scss/; check the existing files before adding styles. Keep tests in tests/. Name unit tests .unit.test.js and browser tests .browser.test.js.
The project uses ESLint, Prettier, and JSDoc for JavaScript, and Stylelint, Prettier, and the configured Sass guidelines for styles.
Check your code without changing files:
npm run eslint
npm run stylelint
npm run prettier -- --checkTo apply automatic fixes and formatting, run:
npm run lintReview the resulting changes. Automatic fixes do not resolve every issue. Code must pass the project's linting and formatting checks before it can be merged.
Run the unit tests:
npm run test:unitFor browser tests, install the Playwright browsers and run the browser suite:
npx playwright install
npm run test:browserBrowser screenshot baselines are maintained in the Linux environment used by CI. Review visual differences before updating them.
Build the affected output:
npm run build
npm run build:packagesThe root build also builds the documentation and demo. For documentation-only changes, run npm run docs:build. npm run demo:build builds the demo separately. Package builds regenerate each workspace package's output. Review generated changes along with source changes.
Also verify the behavior your change affects, including keyboard interaction, focus, and assistive-technology behavior where applicable. Automated tests alone do not establish that an interaction is accessible.
When changing the Core dependency or behavior inherited from Core, verify the affected component behavior with the Core version this project will use. State whether you tested against a published package or a local checkout.
Core's dependent-project testing guidance explains how its workflow tests projects against proposed Core changes. Those results cover only the behavior the dependent tests exercise.
Write commit messages using Conventional Commits. For example:
fix: cancel pending callbacks when disposing a componentThe format is:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
See the specification for commit types, optional scopes, and how to describe breaking changes.
You can use Commitizen to write a commit message through guided prompts:
npm run commitCommit messages must follow this format before a contribution can be merged.
This document was adapted from the open-source contribution guidelines for Facebook's Draft
This document is based on Accessible Ecosystem Core, adapted from its corresponding document.