wardrobecms / core-archived

Wardrobe Core Files

Home Page:http://wardrobecms.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Title attributes on content editor.

Garbee opened this issue · comments

The title attributes to the content editor buttons are irrelevant and/or missing completely. It would be nice if each button was given a title which is the action of the button. This improves a11y and reduces ambiguity as to what the buttons do.

Here is what I am seeing is this not the case for you?

screen shot 2013-09-01 at 11 22 50 pm

Maybe I am not following correct?

I think what @Garbee means is it should say "Link (⌘-K)"

(sorry for response delay, crazy few days just happened.) Well, honestly I don't think the keyboard shortcuts should be shown at all. For instance I had Ctrl + Shift + L being shown for one of my shortcuts on Ubuntu, however that locks the screen. So it isn't useful at all.

The title attributes should just be, "Bold", "Italics", "Blockquote", "Unordered List", "Ordered List", "Link", "Image", "Edit as code", "Undo", "Redo", "Tag post", "Publish date". The keyboard shortcuts are an enhancement to access the buttons, not the primary way to interact with them nor what the buttons stand for.

Thanks guys. I will get this updated.

Pushing this to the v1.1 milestone as it's more involved than I originally thought. These are defined pretty deep in the editor and at first glance doesn't seem to be easily over-ridable.

Looks like it has to do with this area of the code. Setting the title attribute equal to the shortcut when it really should (imo) be set to the name instead.

I just updated line 13950 of public/packages/wardrobe/core/admin/js/structure.js (and removed the following keyboard config lines) to be el.title = name; and then refreshed the backend. Those that had names setup work fine, however there are still the "Edit as code" buttons and later that don't get a title attached.

I'm not sure how to override the editors toolbar creation function so we can set custom titles without touching the core code. I'll look into it over the next few days though.

I was short on time tonight as I'm about to go on vacation. Going off memory the setup is in post_view.coffee. 

Eric Barnes

On Fri, Sep 6, 2013 at 9:15 PM, Jonathan Garbee notifications@github.com
wrote:

I just updated line 13950 of structure.js (and removed the following keyboard config lines) to be el.title = name; and then refreshed the backend. Those that had names setup work fine, however there are still the "Edit as code" buttons and later that don't get a title attached.

I'm not sure how to override the editors toolbar creation function so we can set custom titles without touching the core code. I'll look into it over the next few days though.

Reply to this email directly or view it on GitHub:
#33 (comment)

I'll check it out a bit. Not sure if the tool tips are customizable while also keeping the functioning keyboard shortcuts...