Skip to content

Commit

Permalink
Merge branch 't/10042' into major
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed May 17, 2013
2 parents a4d3172 + 7ef653a commit aaf6492
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 6 deletions.
6 changes: 4 additions & 2 deletions core/editable.js
Expand Up @@ -922,11 +922,13 @@
// editable is instead handled by plugin.
if ( editable && editable.isInline() ) {

var ariaLabel = this.lang.editor + ', ' + this.name;
var ariaLabel = editor.title;

editable.changeAttr( 'role', 'textbox' );
editable.changeAttr( 'aria-label', ariaLabel );
editable.changeAttr( 'title', ariaLabel );

if ( ariaLabel )
editable.changeAttr( 'title', ariaLabel );

// Put the voice label in different spaces, depending on element mode, so
// the DOM element get auto detached on mode reload or editor destroy.
Expand Down
44 changes: 44 additions & 0 deletions core/editor.js
Expand Up @@ -362,6 +362,8 @@

function loadLang( editor ) {
CKEDITOR.lang.load( editor.config.language, editor.config.defaultLanguage, function( languageCode, lang ) {
var configTitle = editor.config.title;

/**
* The code for the language resources that have been loaded
* for the user interface elements of this editor instance.
Expand All @@ -386,6 +388,19 @@
// not a direct reference to it.
editor.lang = CKEDITOR.tools.prototypedCopy( lang );

/**
* Indicates the human-readable title of this editor. Although this is a read-only property,
* it can be initialized with {@link CKEDITOR.config#title}.
*
* **Note:** Please don't confuse this property with {@link CKEDITOR.editor#name editor.name}
* which identifies the instance in {@link CKEDITOR#instances} literal.
*
* @since 4.2
* @readonly
* @property {String/Boolean}
*/
editor.title = typeof configTitle == 'string' || configTitle === false ? configTitle : [ editor.lang.editor, editor.name ].join( ', ' );

// We're not able to support RTL in Firefox 2 at this time.
if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 && editor.lang.dir == 'rtl' )
editor.lang.dir = 'ltr';
Expand Down Expand Up @@ -1085,6 +1100,35 @@ CKEDITOR.ELEMENT_MODE_INLINE = 3;
* @member CKEDITOR.config
*/

/**
* Customizes the {@link CKEDITOR.editor#title human-readable title} of this editor. This title is displayed in
* tooltips and impacts on various accessibility aspects, e.g. it is commonly used by screen readers
* for distinguishing editor instances and for navigation. Accepted values are string or `false`.
*
* **Note:** When `config.title` set globally, the same value will be applied to all editor instances
* loaded with this config. This may have a critical impact on several accessibility aspects.
*
* **Note:** Setting `config.title = false` may also have a critical impact on
* several accessibility aspects.
*
* **Note:** Please don't confuse this property with {@link CKEDITOR.editor#name}
* which identifies the instance in {@link CKEDITOR#instances} literal.
*
* // Set title to 'My WYSIWYG editor.'. The original title of the element (if any)
* // will be restored once the editor instance is destroyed.
* config.title = 'My WYSIWYG editor.';
*
* // Don't touch the title. If the element already has a title, it remains untouched.
* // Also if there is no title attribute, nothing new will be added.
* config.title = false;
*
* @since 4.2
* @cfg {String/Boolean} [title=based on editor.name]
* @member CKEDITOR.config
* @see CKEDITOR.editor.name
* @see CKEDITOR.editor.title
*/

/**
* Sets listeners on editor's events.
*
Expand Down
11 changes: 7 additions & 4 deletions plugins/wysiwygarea/plugin.js
Expand Up @@ -45,11 +45,15 @@
if ( useOnloadEvent )
iframe.on( 'load', onLoad );

var frameLabel = [ editor.lang.editor, editor.name ].join( ',' ),
var frameLabel = editor.title,
frameDesc = editor.lang.common.editorHelp;

if ( CKEDITOR.env.ie )
frameLabel += ', ' + frameDesc;
if ( frameLabel ) {
if ( CKEDITOR.env.ie )
frameLabel += ', ' + frameDesc;

iframe.setAttribute( 'title', frameLabel );
}

var labelId = CKEDITOR.tools.getNextId(),
desc = CKEDITOR.dom.element.createFromHtml( '<span id="' + labelId + '" class="cke_voice_label">' + frameDesc + '</span>' );
Expand All @@ -65,7 +69,6 @@
iframe.setAttributes({
frameBorder: 0,
'aria-describedby' : labelId,
title: frameLabel,
src: src,
tabIndex: editor.tabIndex,
allowTransparency: 'true'
Expand Down

4 comments on commit aaf6492

@naveen020
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is any other why to fix this tool tip issue in CKeditor ........

@mlewand
Copy link
Contributor

@mlewand mlewand commented on aaf6492 Jun 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@naveen020 What do you mean?

@naveen020
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tool_tip
here i attached one images please look in to that
here title is is taken as a tool tip .is there any chance to ignore it ?

@mlewand
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.