-
Notifications
You must be signed in to change notification settings - Fork 527
Open
Labels
accessibilityaffects: 7.xIssue impacts 7.x releasesIssue impacts 7.x releasesaffects: 8.xIssue impacts 8.x releasesIssue impacts 8.x releasesaffects: 9.xIssue impacts 9.x releasesIssue impacts 9.x releasesbughelp wantedNeeds a volunteer to claim to move forwardNeeds a volunteer to claim to move forwarduxUser Experience related worksUser Experience related works
Description
Bootstrap style overrides break theming
In _global-styles.scss, success and warning button colors are manually darkened to meet a11y requirements:
btn-success/btn-outline-success: darkened viadarken($success, …)btn-warning/btn-outline-warning: darkened viadarken($warning, …)- Success button text color is hardcoded to
#fff
File reference:
https://github.com/DSpace/dspace-angular/blob/main/src/styles/_global-styles.scss#L363
Why this is a problem
- Breaks theming: custom
$success/$warningcolors are always overridden, even if already a11y compliant - Inconsistent across components: buttons use altered colors, while other components (badges, alerts, etc.) use base values
- Bypasses Bootstrap color system: semantic colors should be defined once and reused, not modified per variant
- Contrast handling becomes unreliable: hardcoded
color: #fffbypasses Bootstrap’s contrast logic (color-contrast()in BS5)
Root cause
Introduced in:
#2587
Accessibility fixes were applied to specific Bootstrap button variants instead of adjusting semantic theme colors.
Proposed solution
- Define accessible
$successand$warningcolors at theme level - Remove
darken(...)overrides from button styles - Remove hardcoded
color: #fff - Let Bootstrap handle contrast (
color-contrast()in BS5, or$yiq-contrastin BS4 for backports)
Expected outcome
- Consistent behavior across components
- Predictable theming
- Alignment with Bootstrap’s color system
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
accessibilityaffects: 7.xIssue impacts 7.x releasesIssue impacts 7.x releasesaffects: 8.xIssue impacts 8.x releasesIssue impacts 8.x releasesaffects: 9.xIssue impacts 9.x releasesIssue impacts 9.x releasesbughelp wantedNeeds a volunteer to claim to move forwardNeeds a volunteer to claim to move forwarduxUser Experience related worksUser Experience related works
Type
Projects
Status
📋 To Do