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
  • Issues
  • #30687
Closed
Open
Issue created Apr 29, 2020 by Administrator@rootContributor

Remove role="document" from the dialog and add aria-modal="true"

Created by: DavidMacDonald

Current Code

<div class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">

Solution code

<div class="modal" tabindex="-1" role="dialog" aria-modal="true">
 <div class="modal-dialog" >

Rational

Document role is only necessary if there role="application" on a parent that overrides screen reader short cut keys. The role="dialog" doesn't do that, so it's fine without it ... see aria-practices example https://w3c.github.io/aria-practices/examples/dialog-modal/dialog.html

aria-modal="true" ensure the screen reader user cannot arrow out of the modal inadvertently and replaces the old technique (not used in bootstrap) of aria-hidden on all background content.

Assignee
Assign to
Time tracking