Changeset 4935


Ignore:
Timestamp:
01/16/10 07:21:41 (6 years ago)
Author:
garry.yao
Message:

Fixing accessibilty plugin breaks when certain ARIA attributes haven't present on the widget.

Location:
CKEditor/branches/features/aria/_source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CKEditor/branches/features/aria/_source/core/config.js

    r4934 r4935  
    213213         * @example
    214214         */
    215         plugins : 'about,basicstyles,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,div,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,smiley,showblocks,showborders,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',
     215        plugins : 'about,accessibility,basicstyles,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,div,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,smiley,showblocks,showborders,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',
    216216
    217217        /**
  • CKEditor/branches/features/aria/_source/plugins/accessibility/plugin.js

    r4928 r4935  
    4444                        return element;
    4545
    46                 var labelText = element.getAttribute( 'aria-label' ) || doc.getById( element.getAttribute( 'aria-labelledby' ) ).getText() || '',
    47                                 descriptionText = doc.getById( element.getAttribute( 'aria-describedby' ) ).getText() || '',
    48                                 legend = [ labelText, role, descriptionText ].join( ' ' );
     46                var attrValue,
     47                         labelText = element.getAttribute( 'aria-label' ) || ( attrValue = element.getAttribute( 'aria-labelledby' ) ) && doc.getById( attrValue ).getText() || '',
     48                         descriptionText = ( attrValue = element.getAttribute( 'aria-describedby' ) ) && doc.getById( attrValue ).getText() || '',
     49                         legend = [ labelText, role, descriptionText ].join( ' ' );
    4950
    5051                // Remove all ARIA attributes on the widget that could
     
    9192        });
    9293
    93 } )( );
     94} )();
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2015 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy