Make WordPress Core

Changeset 29878


Ignore:
Timestamp:
10/12/2014 12:46:26 AM (12 years ago)
Author:
azaozz
Message:

Quicktags: remove accesskey attributes the buttons and don't add empty title attributes, fixes #29358

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/quicktags.js

    r27857 r29878  
    321321         * @param string|function arg1 Required. Either a starting tag to be inserted like "<span>" or a callback that is executed when the button is clicked.
    322322         * @param string arg2 Optional. Ending tag like "</span>"
    323          * @param string access_key Optional. Access key for the button.
     323         * @param string access_key Deprecated Not used
    324324         * @param string title Optional. Button's title="..."
    325325         * @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.
     
    401401                t.id = id;
    402402                t.display = display;
    403                 t.access = access;
     403                t.access = '';
    404404                t.title = title || '';
    405405                t.instance = instance || '';
    406406        };
    407407        qt.Button.prototype.html = function(idPrefix) {
    408                 var access = this.access ? ' accesskey="' + this.access + '"' : '';
     408                var title = this.title ? ' title="' + this.title + '"' : '';
     409
    409410                if ( this.id === 'fullscreen' ) {
    410                         return '<button type="button" id="' + idPrefix + this.id + '"' + access + ' class="ed_button qt-fullscreen" title="' + this.title + '"></button>';
    411                 }
    412                 return '<input type="button" id="' + idPrefix + this.id + '"' + access + ' class="ed_button button button-small" title="' + this.title + '" value="' + this.display + '" />';
     411                        return '<button type="button" id="' + idPrefix + this.id + '" class="ed_button qt-fullscreen"' + title + '></button>';
     412                }
     413                return '<input type="button" id="' + idPrefix + this.id + '" class="ed_button button button-small"' + title + ' value="' + this.display + '" />';
    413414        };
    414415        qt.Button.prototype.callback = function(){};
     
    564565        // the link button
    565566        qt.LinkButton = function() {
    566                 qt.TagButton.call(this, 'link', 'link', '', '</a>', 'a');
     567                qt.TagButton.call(this, 'link', 'link', '', '</a>');
    567568        };
    568569        qt.LinkButton.prototype = new qt.TagButton();
     
    592593        // the img button
    593594        qt.ImgButton = function() {
    594                 qt.TagButton.call(this, 'img', 'img', '', '', 'm');
     595                qt.TagButton.call(this, 'img', 'img', '', '');
    595596        };
    596597        qt.ImgButton.prototype = new qt.TagButton();
     
    636637
    637638        // ensure backward compatibility
    638         edButtons[10] = new qt.TagButton('strong','b','<strong>','</strong>','b');
    639         edButtons[20] = new qt.TagButton('em','i','<em>','</em>','i'),
     639        edButtons[10] = new qt.TagButton('strong','b','<strong>','</strong>');
     640        edButtons[20] = new qt.TagButton('em','i','<em>','</em>'),
    640641        edButtons[30] = new qt.LinkButton(), // special case
    641         edButtons[40] = new qt.TagButton('block','b-quote','\n\n<blockquote>','</blockquote>\n\n','q'),
    642         edButtons[50] = new qt.TagButton('del','del','<del datetime="' + _datetime + '">','</del>','d'),
    643         edButtons[60] = new qt.TagButton('ins','ins','<ins datetime="' + _datetime + '">','</ins>','s'),
     642        edButtons[40] = new qt.TagButton('block','b-quote','\n\n<blockquote>','</blockquote>\n\n'),
     643        edButtons[50] = new qt.TagButton('del','del','<del datetime="' + _datetime + '">','</del>'),
     644        edButtons[60] = new qt.TagButton('ins','ins','<ins datetime="' + _datetime + '">','</ins>'),
    644645        edButtons[70] = new qt.ImgButton(), // special case
    645         edButtons[80] = new qt.TagButton('ul','ul','<ul>\n','</ul>\n\n','u'),
    646         edButtons[90] = new qt.TagButton('ol','ol','<ol>\n','</ol>\n\n','o'),
    647         edButtons[100] = new qt.TagButton('li','li','\t<li>','</li>\n','l'),
    648         edButtons[110] = new qt.TagButton('code','code','<code>','</code>','c'),
    649         edButtons[120] = new qt.TagButton('more','more','<!--more-->\n\n','','t'),
     646        edButtons[80] = new qt.TagButton('ul','ul','<ul>\n','</ul>\n\n'),
     647        edButtons[90] = new qt.TagButton('ol','ol','<ol>\n','</ol>\n\n'),
     648        edButtons[100] = new qt.TagButton('li','li','\t<li>','</li>\n'),
     649        edButtons[110] = new qt.TagButton('code','code','<code>','</code>'),
     650        edButtons[120] = new qt.TagButton('more','more','<!--more-->\n\n',''),
    650651        edButtons[140] = new qt.CloseButton();
    651652
Note: See TracChangeset for help on using the changeset viewer.