Changeset 4914


Ignore:
Timestamp:
01/12/2010 01:01:38 PM (5 years ago)
Author:
garry.yao
Message:

Enhance ARIA support for dialogs by describe frequent used keystrokes.

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

Legend:

Unmodified
Added
Removed
  • CKEditor/branches/features/aria/_source/lang/en.js

    r4913 r4914  
    3333         */
    3434        editorTitle             : 'Rich text editor, %1',
    35         editorWysiwygModeVoiceLabel : 'Wysiwyg mode, press ALT+F10 moves to toolbar, ALT+F11 moves to elementspath bar.SHIFT+F10 opens contextmenu.',
     35        editorWysiwygModeVoiceLabel : 'Wysiwyg mode, press ALT+F10 moves to toolbar, ALT+F11 moves to elementspath bar, SHIFT+F10 opens contextmenu.',
    3636        editorSourceModeVoiceLabel : 'Source mode, press ALT+F10 moves to toolbar.',
     37        dialogVoiceLabel : 'Press Esc to close dialog, enter to submit dialog, ALT+F10 moves to tab list.',
    3738
    3839        // Toolbar buttons without dialogs.
  • CKEditor/branches/features/aria/_source/plugins/dialog/plugin.js

    r4911 r4914  
    136136                this.parts = themeBuilt.parts;
    137137
     138                var dialogPart = this.parts.dialog,
     139                         contentsPart = this.parts.contents,
     140                         titleId = this.parts.title.$.id,
     141                         descriptiveLabelId = titleId.replace( 'title', 'desc' ),
     142                         descriptiveLabel = CKEDITOR.dom.element.createFromHtml( '<label id="' + descriptiveLabelId + '" style="display:none">' + editor.lang.dialogVoiceLabel+ '</label>' );
     143
     144                descriptiveLabel.insertAfter( contentsPart );
     145                contentsPart.setAttributes(
     146                {
     147                        'role' : 'dialog',
     148                        'aria-labelledby' : titleId,
     149                        'aria-describedby' : descriptiveLabelId
     150                } );
     151
    138152                // Set the startup styles for the dialog, avoiding it enlarging the
    139153                // page size on the dialog creation.
    140                 this.parts.dialog.setStyles(
     154                dialogPart.setStyles(
    141155                        {
    142156                                position : CKEDITOR.env.ie6Compat ? 'absolute' : 'fixed',
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy