-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long image alt text protrudes into editor when image is selected #1435
Changes from 19 commits
b421a0f
dcfad4b
98844aa
cfd3ea7
9de9d4e
4f8d97a
2d0f917
00818b5
4c344ea
e5d4773
35e142f
292fdce
df6a216
8410c2e
b0cfe8a
6445fa5
bb88ee4
cdd7c9f
100a642
b6524ad
8d3927c
feb9509
12b0c86
2265b65
d4ad381
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1096,5 +1096,35 @@ bender.test( { | |
|
||
assert.areEqual( '<p>[[placeholder]]</p>', editor.getData() ); | ||
} ); | ||
}, | ||
|
||
// (#898) | ||
'Test image long alt visibility': function() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually test does not check alt visibility, but styles for hidden selection container. |
||
var bot = this.editorBot, | ||
editor = bot.editor; | ||
|
||
bot.setData( '<p>[<span id="bar">bar</span>]</p>', function() { | ||
var altContainer, styles, expected; | ||
|
||
editor.getSelection().fake( editor.document.getById( 'bar' ), '<i>foo</i>' ); | ||
|
||
altContainer = editor.editable().findOne( '[data-cke-hidden-sel]' ); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 14 ) { | ||
assert.areEqual( 'none', altContainer.getStyle( 'display' ) ); | ||
} else { | ||
styles = CKEDITOR.tools.parseCssText( altContainer.getAttributes().style ); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's safer to check computed styles of the container, not the ones in |
||
expected = { | ||
position: 'fixed', | ||
top: 0, | ||
left: '-1000px', | ||
width: 0, | ||
height: 0, | ||
overflow: 'hidden' | ||
}; | ||
|
||
assert.isTrue( CKEDITOR.tools.objectCompare( expected, styles ) ); | ||
} | ||
} ); | ||
} | ||
} ); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div id="editor"> | ||
<p>Test: <img src="%BASE_PATH%/_assets/logo.png" alt="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."></p> | ||
</div> | ||
|
||
<script> | ||
CKEDITOR.replace( 'editor' ); | ||
</script> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@bender-tags: 4.10.2, bug, 898 | ||
@bender-ui: collapsed | ||
@bender-ckeditor-plugins: wysiwygarea, image2 | ||
|
||
Click on the image | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There should be also instructions for testing in JAWS. |
||
|
||
## Expected: | ||
|
||
There shouldn't be any visible text around the image. | ||
|
||
## Unexpected: | ||
|
||
There is a visible text around the image. | ||
|
||
# Test steps for browsers supporting JAWS text reader: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We only support Firefox + JAWS combo. |
||
|
||
1. Open JAWS. | ||
1. Place caret in the text, eg: `Test: ^`. | ||
1. Use right arrow to select the image. | ||
|
||
## Expected: | ||
|
||
Text reader reads image alt text: | ||
|
||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr... | ||
|
||
## Unexpected: | ||
|
||
Text reader doesn't read image alt text. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not API change, entry should be in "Fixed Issues" section.
Additionally the name of the plugin is "Enhanced Image", not "Image2".