Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !37434

v6: explore different styles for active (toggled) and disabled controls to not rely on use of color

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Patrick H. Lauke requested to merge patrickhlauke-use-of-color-tweaks into main Nov 06, 2022
  • Overview 1
  • Commits 2
  • Pipelines 0
  • Changes 1

Description

Come up with changes/different styles for the toggled/active styling, which currently relies on use of color

Motivation & Context

The active class (when it conveys the toggled/pressed state of a control - not required for just regular non-toggle-able controls) should have a much stronger differentiation with the non-active class for cases like button toggles, custom checkboxes/radio buttons, dropdown triggers.

The same arguably also applies to disabled controls - they need to visually be differentiated from operable/active controls, without relying just on shading/tinting (OR the shading/tinting needs to have a difference of 3:1 to the regular state).

current regular, active, and disabled buttons only differentiated by subtle background colour differences

If we're only going by a change of background, as is currently the case, the difference between the non-active and active background should be at least a ratio of 3:1 (see the second note in https://www.w3.org/WAI/WCAG21/Understanding/use-of-color.html ... which, incidentally, i wrote)

This approach (making the active style darker for dark controls, lighter for light controls) gets very limiting, as there simply aren't enough shading/tinting options for all our colours to reliably get to a 3:1 ratio, both for disabled and for active (toggled) state.

This branch explores some options. It's not meant as a mergeable PR at this point, but for initial exploration

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

  • https://deploy-preview-37434--twbs-bootstrap.netlify.app/

Related issues

https://github.com/twbs/bootstrap/issues/37365

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: patrickhlauke-use-of-color-tweaks