Ticket #5125: 5125.patch

File 5125.patch, 2.8 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/wysiwygarea/plugin.js

     
    241241                        var fixForBody = ( editor.config.enterMode != CKEDITOR.ENTER_BR )
    242242                                ? editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p' : false;
    243243
     244                        var frameLabel = editor.lang.editorTitle.replace( '%1', editor.name );
     245
    244246                        editor.on( 'editingBlockReady', function()
    245247                                {
    246248                                        var mainElement,
     
    250252                                                frameLoaded,
    251253                                                fireMode;
    252254
    253                                         var frameLabel = editor.lang.editorTitle.replace( '%1', editor.name );
    254255
    255256                                        // Support for custom document.domain in IE.
    256257                                        var isCustomDomain = CKEDITOR.env.isCustomDomain();
     
    275276                                                                '})())"' : '' ) +
    276277                                                        ' tabIndex="-1"' +
    277278                                                        ' allowTransparency="true"' +
    278                                                         ' role="region"' +
     279                                                        ' role="editbox"' +
    279280                                                        ' aria-multiline="true"' +
    280281                                                        ' aria-label="' + frameLabel + '"' +
    281282                                                        '></iframe>' );
     
    722723                                        editor.on( 'selectionChange', onSelectionChangeFixBody, null, null, 1 );
    723724                                });
    724725
     726                        var titleBackup;
     727                        // Setting voice label as window title, backup the original one
     728                        // and restore it before running into use.
     729                        editor.on( 'contentDom', function ()
     730                                {
     731                                        titleBackup = editor.document.$.title;
     732                                        editor.document.$.title = frameLabel;
     733                                });
     734
     735                        editor.on( 'beforeModeUnload', function()
     736                                {
     737                                        editor.mode == 'wysiwyg' && ( editor.document.$.title = titleBackup );
     738                                });
     739
    725740                        // Create an invisible element to grab focus.
    726741                        if( CKEDITOR.env.ie )
    727742                        {
  • _source/plugins/a11ycompat/plugin.js

     
    2222        function lookupARIASupport( role, tagName )
    2323        {
    2424                return {
    25                                 'dialog' :       env.gecko && env.version >= 10900,
    26                                 'region' : env.gecko && env.version >= 10900
     25                                'dialog' :       env.gecko && env.version >= 10900
    2726                        }[ role ];
    2827        }
    2928
     
    7271                        fieldset.insertBefore( element );
    7372                        fieldset.append( element );
    7473                }
    75                 // The only reliable substitution of aria-label on an iframe
    76                 // is to use the content window title of that frame.
    77                 else if ( element.is( 'iframe' ) )
    78                 {
    79                         doc = element.$.contentWindow.document;
    80                         var title = doc.title;
    81 
    82                         // Backup the title and restore it before running into use.
    83                         title && editor.on( 'beforeModeUnload', function() { doc.title = title; } );
    84                         doc.title = allInOne;
    85                 }
    86         }
     74        }
    8775
    8876        CKEDITOR.plugins.add( 'a11ycompat',
    8977        {
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy