Opened 2 years ago

Closed 2 years ago

Last modified 2 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 2 years ago by Marek Lewandowski

Status: newconfirmed

comment:2 Changed 2 years ago by Tomasz Jakut

Owner: set to Tomasz Jakut
Status: confirmedassigned

comment:3 Changed 2 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 2 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 2 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 2 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 2 years ago by Marek Lewandowski

Resolution: fixed
Status: review_passedclosed

Merged to master with git:6a08bac5.

Last edited 2 years ago by Marek Lewandowski (previous) (diff)
Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy