On CKEditor V4 all the editor buttons include a title attribute which triggers 50 errors on my client accessibility software.
Although we advised that this is not really an issue since the issue is caused because the title attribute exists with a different text that is on the button, the client insists this issue needs to be fixed.
Upgrading to V5 is not a possibility.
Is it possible to remove the title attribute from CKEditor buttons (ex: Bold, Italic, Font...)?
Is there another way to fix this issue?
Thanks in advance.
First of all: You should not remove the
titleattribute, it is deteriorating usability and therefore accessibility.– Icon Usability by NN/g
It might still be interesting how one would go about reliably changing toolbar buttons’ properties.
A lot of articles work directly on the DOM, which is a hack and sensitive to side-effects. You never know when a component is re-rendering its DOM.
The editor titles come from the toolbar configuration, specifically from
config.toolbar[*].items[*].title.You will need to apply an “Item by Item” Configuration by creating a function to remove titles from the configuration.
I couldn’t figure out how to intervene each time when a new config part is loaded, for example by plug-ins, so in the example
editorConfigis only called once with an object that does not definetoolbar.