Changeset 4898


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

Enhancing toolbar buttons in the following sense:

  1. Pressed button state indication.
  2. Menu type button (combo button) indication.
Location:
CKEditor/branches/features/aria/_source/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CKEditor/branches/features/aria/_source/plugins/button/plugin.js

    r4896 r4898  
    140140                                ' hidefocus="true"' +
    141141                            ' role="button"' +
    142                                 ' aria-labelledby="' + id + '_label"' );
     142                                ' aria-labelledby="' + id + '_label"' +
     143                                ( this.hasArrow ?  ' aria-haspopup="true"' : '' ) );
    143144
    144145                // Some browsers don't cancel key events in the keydown but in the
     
    204205                                element.setAttribute( 'aria-disabled', true ) :
    205206                                element.removeAttribute( 'aria-disabled' );
     207
     208                        state == CKEDITOR.TRISTATE_ON ?
     209                                element.setAttribute( 'aria-pressed', true ) :
     210                                element.removeAttribute( 'aria-pressed' );
    206211                }
    207212
  • CKEditor/branches/features/aria/_source/plugins/richcombo/plugin.js

    r4897 r4898  
    166166                                        '<span id="' + id+ '_label" class=cke_label>', this.label, '</span>' +
    167167                                        '<a hidefocus=true title="', this.title, '" tabindex="-1" href="javascript:void(\'', this.label, '\')"' +
    168                                                 ' role="button" aria-labelledby="', id , '_label" aria-describedby="', id, '_text"' );
     168                                                ' role="button" aria-labelledby="', id , '_label" aria-describedby="', id, '_text" aria-haspopup="true"' );
    169169
    170170                        // Some browsers don't cancel key events in the keydown but in the
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy