From 30902e52a99463e94cd6b56e6e0eb998517190db Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sun, 12 Oct 2014 00:46:26 +0000 Subject: [PATCH] Quicktags: remove `accesskey` attributes the buttons and don't add empty `title` attributes, fixes #29358 git-svn-id: https://develop.svn.wordpress.org/trunk@29878 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/quicktags.js | 35 +++++++++++++++++---------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/src/wp-includes/js/quicktags.js b/src/wp-includes/js/quicktags.js index 9fc9c69d4a..314a0d2113 100644 --- a/src/wp-includes/js/quicktags.js +++ b/src/wp-includes/js/quicktags.js @@ -320,7 +320,7 @@ function edButton(id, display, tagStart, tagEnd, access) { * @param string display Required. Button's value="..." * @param string|function arg1 Required. Either a starting tag to be inserted like "" or a callback that is executed when the button is clicked. * @param string arg2 Optional. Ending tag like "" - * @param string access_key Optional. Access key for the button. + * @param string access_key Deprecated Not used * @param string title Optional. Button's title="..." * @param int priority Optional. Number representing the desired position of the button in the toolbar. 1 - 9 = first, 11 - 19 = second, 21 - 29 = third, etc. * @param string instance Optional. Limit the button to a specifric instance of Quicktags, add to all instances if not present. @@ -400,16 +400,17 @@ function edButton(id, display, tagStart, tagEnd, access) { var t = this; t.id = id; t.display = display; - t.access = access; + t.access = ''; t.title = title || ''; t.instance = instance || ''; }; qt.Button.prototype.html = function(idPrefix) { - var access = this.access ? ' accesskey="' + this.access + '"' : ''; + var title = this.title ? ' title="' + this.title + '"' : ''; + if ( this.id === 'fullscreen' ) { - return ''; + return ''; } - return ''; + return ''; }; qt.Button.prototype.callback = function(){}; @@ -563,7 +564,7 @@ function edButton(id, display, tagStart, tagEnd, access) { // the link button qt.LinkButton = function() { - qt.TagButton.call(this, 'link', 'link', '', '', 'a'); + qt.TagButton.call(this, 'link', 'link', '', ''); }; qt.LinkButton.prototype = new qt.TagButton(); qt.LinkButton.prototype.callback = function(e, c, ed, defaultValue) { @@ -591,7 +592,7 @@ function edButton(id, display, tagStart, tagEnd, access) { // the img button qt.ImgButton = function() { - qt.TagButton.call(this, 'img', 'img', '', '', 'm'); + qt.TagButton.call(this, 'img', 'img', '', ''); }; qt.ImgButton.prototype = new qt.TagButton(); qt.ImgButton.prototype.callback = function(e, c, ed, defaultValue) { @@ -635,18 +636,18 @@ function edButton(id, display, tagStart, tagEnd, access) { }; // ensure backward compatibility - edButtons[10] = new qt.TagButton('strong','b','','','b'); - edButtons[20] = new qt.TagButton('em','i','','','i'), + edButtons[10] = new qt.TagButton('strong','b','',''); + edButtons[20] = new qt.TagButton('em','i','',''), edButtons[30] = new qt.LinkButton(), // special case - edButtons[40] = new qt.TagButton('block','b-quote','\n\n
','
\n\n','q'), - edButtons[50] = new qt.TagButton('del','del','','','d'), - edButtons[60] = new qt.TagButton('ins','ins','','','s'), + edButtons[40] = new qt.TagButton('block','b-quote','\n\n
','
\n\n'), + edButtons[50] = new qt.TagButton('del','del','',''), + edButtons[60] = new qt.TagButton('ins','ins','',''), edButtons[70] = new qt.ImgButton(), // special case - edButtons[80] = new qt.TagButton('ul','ul','\n\n','u'), - edButtons[90] = new qt.TagButton('ol','ol','
    \n','
\n\n','o'), - edButtons[100] = new qt.TagButton('li','li','\t
  • ','
  • \n','l'), - edButtons[110] = new qt.TagButton('code','code','','','c'), - edButtons[120] = new qt.TagButton('more','more','\n\n','','t'), + edButtons[80] = new qt.TagButton('ul','ul','\n\n'), + edButtons[90] = new qt.TagButton('ol','ol','
      \n','
    \n\n'), + edButtons[100] = new qt.TagButton('li','li','\t
  • ','
  • \n'), + edButtons[110] = new qt.TagButton('code','code','',''), + edButtons[120] = new qt.TagButton('more','more','\n\n',''), edButtons[140] = new qt.CloseButton(); })();