Skip to content

Commit f48fc5c

Browse files
committed
#10361: Stabilized the listbox announcement on JAWS by moving the ARIA role to the inner element.
1 parent fe3593f commit f48fc5c

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

plugins/listblock/plugin.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ CKEDITOR.plugins.add( 'listblock', {
3737
// Call the base contructor.
3838
this.base.apply( this, arguments );
3939

40+
// Set the proper a11y attributes.
41+
this.element.setAttribute( 'role', attribs.role );
42+
4043
var keys = this.keys;
4144
keys[ 40 ] = 'next'; // ARROW-DOWN
4245
keys[ 9 ] = 'next'; // TAB

plugins/panel/plugin.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
'{frame}' +
7171
'</div>' );
7272

73-
var frameTpl = CKEDITOR.addTemplate( 'panel-frame', '<iframe id="{id}" class="cke_panel_frame" role="application" frameborder="0" src="{src}"></iframe>' );
73+
var frameTpl = CKEDITOR.addTemplate( 'panel-frame', '<iframe id="{id}" class="cke_panel_frame" role="presentation" frameborder="0" src="{src}"></iframe>' );
7474

7575
var frameDocTpl = CKEDITOR.addTemplate( 'panel-frame-inner', '<!DOCTYPE html>' +
7676
'<html class="cke_panel_container {env}" dir="{dir}" lang="{langCode}">' +
@@ -279,8 +279,16 @@
279279
if ( blockDefinition )
280280
CKEDITOR.tools.extend( this, blockDefinition );
281281

282-
if ( !this.attributes.title )
283-
this.attributes.title = this.attributes[ 'aria-label' ];
282+
283+
// Set the a11y attributes of this element ...
284+
this.element.setAttributes({
285+
'aria-label': this.attributes[ 'aria-label' ],
286+
'title': this.attributes.title || this.attributes[ 'aria-label' ]
287+
});
288+
289+
// ... and remove them from being set in the panel main element.
290+
delete this.attributes[ 'aria-label' ];
291+
delete this.attributes.title;
284292

285293
this.keys = {};
286294

0 commit comments

Comments
 (0)