#14701 closed Bug (fixed)
More precise labels for image and placeholder widgets
Reported by: | Marek Lewandowski | Owned by: | Tomasz Jakut |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.5.10 |
Component: | General | Version: | 4.5.11 |
Keywords: | Cc: |
Description
In issue #14539 we added getLabel
method to the widget definition.
Now we'd like to utilize it in image2 and placeholder plugins.
I'd propose following labels:
- image:
"<alt>" image widget
- placeholder:
"<placeholderName>" placeholder widget
Change History (7)
comment:1 Changed 8 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 8 years ago by
Owner: | set to Tomasz Jakut |
---|---|
Status: | confirmed → assigned |
comment:3 Changed 8 years ago by
Status: | assigned → review |
---|
comment:4 Changed 8 years ago by
Status: | review → review_failed |
---|
- Instead
this.editor.lang.image2.pathName
let's simply usethis.pathName
. It's shorter and allows devs to override it in case of need. - Image2: we're missing a space between alt and the path name, so we end up with
aria-label="fooimage widget"
instead ofaria-label="foo image widget"
. - I'd love to see a single unit test for each plugin, so that we'll avoid regressions later on.
comment:5 Changed 8 years ago by
Status: | review_failed → review |
---|
Added unit tests & fixed incorrect label for image2 plugin. Pushed changes to branch:t/14701.
comment:6 Changed 8 years ago by
Status: | review → review_passed |
---|
R+ with minor change:
- Instead of calling
this.wrapper.findOne( 'img' ).getAttribute( 'alt' )
for widgets we'd be better withthis.data.alt
. The former one would break if the widgets had added an img before the main img (e.g. drag handler were moved to the beginning of widget wrapper).
Added this change to t/14701.
comment:7 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Merged to master with git:6a08bac5.
I've added
getLabel
method to placeholder and image2 plugins. Pushed changes to branch:t/14701.