Skip to content

Commit

Permalink
Update tests for disabled labels.
Browse files Browse the repository at this point in the history
  • Loading branch information
Comandeer authored and jacekbogdanski committed May 9, 2022
1 parent 33bfdbe commit 5b940cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions tests/core/creators/aria.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,18 @@
var editor = bot.editor,
container = editor.container,
frame = container.findOne( 'iframe' ),
frameDocument = frame.getFrameDocument(),
expectedApplicationLabel = createApplicationLabel( editor ),
actualApplicationLabel = container.findOne( '#cke_wysiwygarea_arialbl' ).getHtml(),
expectedEditorLabel = createEditorLabel( editor ),
actualEditorLabel = frame.getAttribute( 'title' ),
actualBodyLabel = frame.getFrameDocument().findOne( 'body' ).getAttribute( 'aria-label' );
actualBodyLabel = frameDocument.findOne( 'body' ).getAttribute( 'aria-label' ),
actualTitleLabel = frameDocument.findOne( 'title' ).getHtml();

assert.areSame( expectedApplicationLabel, actualApplicationLabel, 'Application label is incorrect' );
assert.areSame( expectedEditorLabel, actualEditorLabel, 'Editor label is incorrect' );
assert.areSame( expectedEditorLabel, actualBodyLabel, 'Editor\'s body label is incorrect' );
assert.areSame( expectedEditorLabel, actualTitleLabel, 'Editor\'s title label is incorrect' );
} );
},

Expand Down Expand Up @@ -189,13 +192,16 @@
var editor = bot.editor,
container = editor.container,
frame = container.findOne( 'iframe' ),
frameDocument = frame.getFrameDocument(),
actualApplicationLabel = container.getAttribute( 'aria-labelledby' ),
actualEditorLabel = frame.getAttribute( 'title' ),
actualBodyLabel = frame.getFrameDocument().findOne( 'body' ).getAttribute( 'aria-label' );
actualBodyLabel = frameDocument.findOne( 'body' ).getAttribute( 'aria-label' ),
actualTitleLabel = frameDocument.findOne( 'title' ).getHtml();

assert.isNull( actualApplicationLabel, 'Application label is incorrect' );
assert.isNull( actualEditorLabel, 'Editor label is incorrect' );
assert.isNull( actualBodyLabel, 'Editor\'s body label is incorrect' );
assert.areSame( ' ', actualTitleLabel, 'Editor\'s title label is incorrect' );
} );
}
} );
Expand Down
4 changes: 2 additions & 2 deletions tests/core/creators/manual/themeduidisablededitorlabels.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
Sample announcements for the `iframe`-based editor:

* VoiceOver+Chrome: "Frame. edit text. <content and selection info>"
* NVDA+Firefox: "Rich Text Editor, wysiwygarea, null document editable"
* JAWS+Firefox: "Rich Text Editor, wysiwygarea, frame, null edit <content> type and text"
* NVDA+Firefox: "Rich Text Editor, wysiwygarea, document editable"
* JAWS+Firefox: "Rich Text Editor, wysiwygarea, frame, edit <content> type and text"

Sample announcements for the `div`-based editor:

Expand Down

0 comments on commit 5b940cd

Please sign in to comment.