diff --git a/.changeset/strange-poems-occur.md b/.changeset/strange-poems-occur.md
new file mode 100644
index 0000000000..6e8aa009c5
--- /dev/null
+++ b/.changeset/strange-poems-occur.md
@@ -0,0 +1,5 @@
+---
+'@swisspost/design-system-styles': patch
+---
+
+Fixed color contrast of alert component on success background color.
diff --git a/packages/components/cypress/e2e/alert.cy.ts b/packages/components/cypress/e2e/alert.cy.ts
index 55f9f5a571..6a13348db8 100644
--- a/packages/components/cypress/e2e/alert.cy.ts
+++ b/packages/components/cypress/e2e/alert.cy.ts
@@ -34,12 +34,6 @@ describe('alert', () => {
describe('Accessibility', () => {
it('Has no detectable a11y violations on load for all variants', () => {
cy.getSnapshots('post-alert');
- cy.checkA11y('#root-inner', {
- rules: {
- 'color-contrast': {
- enabled: false,
- },
- },
- });
+ cy.checkA11y('#root-inner');
});
});
diff --git a/packages/documentation/src/stories/foundation/accessibility/accessibility.docs.mdx b/packages/documentation/src/stories/foundation/accessibility/accessibility.docs.mdx
index 402596005d..60a12bf03b 100644
--- a/packages/documentation/src/stories/foundation/accessibility/accessibility.docs.mdx
+++ b/packages/documentation/src/stories/foundation/accessibility/accessibility.docs.mdx
@@ -1,4 +1,4 @@
-import { Meta, Source } from '@storybook/blocks';
+import { Meta, Source, Canvas } from '@storybook/blocks';
import * as AccessibilityStories from './accessibility.stories';
import liveRegionAtomicSample from './liveregion-atomic.sample.html?raw';
import liveRegionGoodAngularSample from './liveregion-good-angular.sample.html?raw';
@@ -8,25 +8,105 @@ import liveRegionBadAngularSample from './liveregion-bad-angular.sample.html?raw
# Accessibility
-
- TODO: write accessibility page
-
+
## Forms
-### Grouping
+### Disabled state
-TODO: write accessibility guide about grouping form elements
-https://www.accessibility-developer-guide.com/examples/forms/grouping-with-fieldset-legend/
+Disabled states of input fields or buttons pose many accessibility issues.
+
+
+
❌
Disabled fields cannot be reached by pressing tab
+
❌
It's often unclear why something is disabled
+
❌
It's often unclear how to enable a disabled field or button
+
❌
Disabled fields have low contrast
+
❌
The disabled state of a field is not always obvious (hard to discern from an enabled field)
+
+
+
+
+
Common use cases and how to handle them.
+
+
+
+
+
+
+
Disabled button on forms with required fields
+
+
+
+
+
❌
Forms with required fields tend to have the send button disabled until all required fields are correctly filled. The issue here is that with long forms or on small devices it's sometimes hard to spot the one field that was missed.
+
+
+
+
+
+
✔️
Let the user make mistakes and help them to correct them. Mark the required fields with error messages, scroll to the first invalid field and help the user fill the form correctly.
+
+
+
+
+
+
Disabled button on form submit
+
+
+
+
+
❌
The user submits a form. While the client waits for the server response and to prevent double submission, the submit button gets disabled. The reason why this button gets disabled might not be obvious.
+
+
+
+
+
✔️
Provide a loading indicator or display a message that shows current progress when uploading large files. Disable duplicate form submissions internally. Inform users that the form was already submitted if they continue to click submit and offer a remedy if the request timed out or an error occurred on the server (reload the page, retry form submission, ...).
+
+
+
+
+
Disabled select options
+
+
+
+
+
❌
Some options in a radio button group or select field are disabled because they are not available at this time or with the current configuration. This can be confusing because it's often unclear why these options are not available or how to enable them.
+
+
+
+
+
✔️
+
+ There are multiple possible solutions, depending on the situation:
+
+
Don't display options that cannot be selected and reduce clutter in your UI.
+
If you need to inform the user that there are potentially more possible options, show instructions on how to enable these options.
+
Display read-only data as text and not in disabled form fields.
+
+
+
+
+
+
+
+
-### Labels
+### Form bad example
-TODO: write accessibility guide about form labels (visible and invisible), aria-label, ...
+