Merge pull request #32774 from nextcloud/enh/a11y/keyboard-legacy-contacts-menu

Enable keyboard activation of legacy contacts menu
pull/30510/head
Louis 3 years ago committed by GitHub
commit 879a8c3b25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      core/src/jquery/contactsmenu.js
  2. 4
      dist/core-main.js
  3. 2
      dist/core-main.js.map

@ -25,6 +25,7 @@
import $ from 'jquery'
import OC from '../OC'
import { isA11yActivation } from '../Util/a11y.js'
const LIST = ''
+ '<div class="menu popovermenu menu-left hidden contactsmenu-popover">'
@ -50,7 +51,11 @@ $.fn.contactsMenu = function(shareWith, shareType, appendTo) {
appendTo.append(LIST)
const $list = appendTo.find('div.contactsmenu-popover')
$div.click(function() {
$div.on('click keydown', function(event) {
if (!isA11yActivation(event)) {
return
}
if (!$list.hasClass('hidden')) {
$list.addClass('hidden')
$list.hide()

4
dist/core-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save