mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Docs: added an accessibility section in the pull request guide (#36454)
* Docs: added an accessibility section in the pull request guide * added more points to the accessibility guideline * fixes some grammar nits * changed aria to capital case since its an acronym * added a reference to the Grafana theme * improved the wordings for better context
This commit is contained in:
parent
c22905f864
commit
f45d0a0b7a
@ -48,6 +48,13 @@ Pull requests that add or modify unit tests that are written in Jest must adhere
|
|||||||
- Don't add snapshots tests. We are incrementally removing existing snapshot tests, we don't want more.
|
- Don't add snapshots tests. We are incrementally removing existing snapshot tests, we don't want more.
|
||||||
- If an existing unit test is written in Enzyme, migrate it to RTL (React Testing Library), unless you’re fixing a bug. Bug fixes usually shouldn't include any bigger refactoring, so it’s ok to skip migrating the test to RTL.
|
- If an existing unit test is written in Enzyme, migrate it to RTL (React Testing Library), unless you’re fixing a bug. Bug fixes usually shouldn't include any bigger refactoring, so it’s ok to skip migrating the test to RTL.
|
||||||
|
|
||||||
|
Pull requests that create new UI components or modify existing ones must adhere to the following accessibility guidelines:
|
||||||
|
|
||||||
|
- Use semantic HTML.
|
||||||
|
- Use ARIA roles, labels and other accessibility attributes correctly. Accessibility attributes should only be used when semantic HTML doesn't satisfy your use case.
|
||||||
|
- Use the [Grafana theme palette](/contribute/style-guides/themes.md) for styling. It contains colors with good contrast which aids accessibility.
|
||||||
|
- Use [RTL](https://testing-library.com/docs/dom-testing-library/api-accessibility/) for writing unit tests. It helps to create accessible components.
|
||||||
|
|
||||||
### Backend-specific guidelines
|
### Backend-specific guidelines
|
||||||
|
|
||||||
Please refer to the [backend style guidelines](/contribute/style-guides/backend.md).
|
Please refer to the [backend style guidelines](/contribute/style-guides/backend.md).
|
||||||
@ -107,6 +114,6 @@ Make sure that the title for your pull request uses the same format as the subje
|
|||||||
|
|
||||||
If your PR includes configuration changes, all of the following files must be changed correspondingly:
|
If your PR includes configuration changes, all of the following files must be changed correspondingly:
|
||||||
|
|
||||||
* conf/defaults.ini
|
- conf/defaults.ini
|
||||||
* conf/sample.ini
|
- conf/sample.ini
|
||||||
* docs/sources/administration/configuration.md
|
- docs/sources/administration/configuration.md
|
||||||
|
Loading…
Reference in New Issue
Block a user