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

modal input autofocus attr & keyboard nav

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/bkdotcom/modal_input_autofocus_keyboard_focus into v4-dev Feb 18, 2018
  • Overview 0
  • Commits 45
  • Pipelines 0
  • Changes 8

Created by: bkdotcom

Two new modal accessibility options

autofocus:

  • notTouch: (default) gives focus to input/button with autofocus attribute when modal is shown (if not a touch device - to not trigger virtual keyboard)
  • true - always honor autofocus attribute
  • false - don't honor autofocus attribute

keyboardNav: (true) | false keyboard left/right arrow keys can be used to focus buttons / move between buttons (does not take focus from input, select, or textarea)

Check out the updated modal component docs to experience the enhancements

Fixes #22402 (closed)

notes:

  • had to ignore "A document must not include more than one “autofocus” attribute." (modal doc contains multiple)...
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/bkdotcom/modal_input_autofocus_keyboard_focus