Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#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 Marek Lewandowski

Status: newconfirmed

comment:2 Changed 8 years ago by Tomasz Jakut

Owner: set to Tomasz Jakut
Status: confirmedassigned

comment:3 Changed 8 years ago by Tomasz Jakut

Status: assignedreview

I've added getLabel method to placeholder and image2 plugins. Pushed changes to branch:t/14701.

comment:4 Changed 8 years ago by Marek Lewandowski

Status: reviewreview_failed
  1. Instead this.editor.lang.image2.pathName let's simply use this.pathName. It's shorter and allows devs to override it in case of need.
  2. Image2: we're missing a space between alt and the path name, so we end up with aria-label="fooimage widget" instead of aria-label="foo image widget".
  3. 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 Tomasz Jakut

Status: review_failedreview

Added unit tests & fixed incorrect label for image2 plugin. Pushed changes to branch:t/14701.

comment:6 Changed 8 years ago by Marek Lewandowski

Status: reviewreview_passed

R+ with minor change:

  • Instead of calling this.wrapper.findOne( 'img' ).getAttribute( 'alt' ) for widgets we'd be better with this.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 Marek Lewandowski

Resolution: fixed
Status: review_passedclosed

Pushed to master at dev.

Version 0, edited 8 years ago by Marek Lewandowski (next)
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy