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
  • !28565

[WIP] Refactor and simplify button plugin

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Patrick H. Lauke requested to merge patrickhlauke-button-keyboard-fix into master Mar 27, 2019
  • Overview 0
  • Commits 7
  • Pipelines 0
  • Changes 2

Fixes persistent keyboard issues with checkbox and radio button "buttons" https://getbootstrap.com/docs/4.3/components/buttons/#button-plugin

Instead of setting the "checked" state on click (which doesn't happen when navigating with the keyboard), this relies on checkboxes and radio buttons just doing their normal thing, and then simply sets the relevant .active class.

Similarly, it simplifies the handling/differentiation for toggles using aria-pressed

Closes https://github.com/twbs/bootstrap/issues/28564 Closes https://github.com/twbs/bootstrap/issues/26855

(pro-tip to test if keyboard is being handled correctly: for the checkbox and radio button buttons, use devtools, find the nested input, and disabled the position:absolute rule in the relevant CSS ... now you can see exactly if a radio or checkbox gets toggled properly or not)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: patrickhlauke-button-keyboard-fix