Opened 10 years ago

Closed 10 years ago

#12204 closed Bug (fixed)

Editor's title not used for voice label, hence impossible to configure the voice label

Reported by: Wim Leers Owned by: Artur Delura
Priority: Normal Milestone: CKEditor 4.4.4
Component: Accessibility Version:
Keywords: Drupal Cc: wim.leers@…

Description

Over at https://www.drupal.org/node/2292035, we noticed that CKEditor's ARIA label (what CKEditor calls the "voice label") is of the form Rich Text Editor, <editor's name attribute>. The editor's name is — according to http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-name — retrieved/generated as follows:

Note: It will be originated from the ID or name attribute of the element, otherwise a name pattern of 'editor{n}' will be used.

Changing the id or name attributes of the corresponding <textarea> is not an option; this would break Drupal APIs. Which means we're stuck with something like

"application: Rich Text Editor, edit-body-0-value"

being uttered by the screen reader, which is not acceptable: it's far too confusing. We know what the (human-readable) label of the field is, so we want that to be used instead! So I went to look for a way to configure the name independently of the name attribute, i.e. to change it to field's label.

Olek then pointed me to http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-title — he thought that defining/setting a title for a CKEditor instance would take precedence over the editor's name. Turns out that config.title only affects the title of an iframe; it doesn't change the voice (ARIA) label.

Piotrek confirmed that this is likely a bug on Twitter: https://twitter.com/reinmarpl/status/489066119115059200.

Change History (8)

comment:1 Changed 10 years ago by Mike Gifford

Thanks Wim!

comment:2 Changed 10 years ago by Frederico Caldeira Knabben

Status: newconfirmed

This is in fact supposed to be covered by #10042 and the new config.title. It is weird that it is not touching ARIA, so research must be done to check it and eventually fix it.

I'm confirming it not in a way to say that the issue is valid, but to confirm that research must be done.

comment:3 Changed 10 years ago by Piotrek Koszuliński

Milestone: CKEditor 4.4.4
Version: 4.4.4 (GitHub - master)

I guess that we just forgot about it. We changed the editable element's title, but missed the voice label. Do you have any idea why we might need to keep the voice label not configurable? As well as in the title's case, in this the developer may use e.g. a non unique name, but then it's that developer's fault. Any other, unique name should be as good as ours default title.

There may be one more thing to analyse though - what should happen if config.title is set to false. In such case we don't change the editable element's title attribute, but what we should do with the voice label? Not create it at all?

comment:4 Changed 10 years ago by Frederico Caldeira Knabben

I dont see any reason for it. Even the configuration confirms that a11y should be touched by it as well. Therefore, this must be fixed.

The expected behavior is that the current behavior will be kept and title should be used only if defined.

comment:5 Changed 10 years ago by Artur Delura

Owner: set to Artur Delura
Status: confirmedassigned

comment:6 Changed 10 years ago by Artur Delura

Status: assignedreview

Changes and tests in branch:t/12204

Last edited 10 years ago by Artur Delura (previous) (diff)

comment:7 Changed 10 years ago by Wim Leers

Thanks for working on this! :)

comment:8 Changed 10 years ago by Piotrek Koszuliński

Resolution: fixed
Status: reviewclosed

Fixed on master with git:24b4fc5.

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