Opened 2 years ago

Last modified 7 months ago

#16819 reopened enhancement

Accessibility: Internal Linking behaviour in Editor / TinyMCE

Reported by: stencil Owned by:
Priority: normal Milestone: Awaiting Review
Component: Editor Version: 3.1
Severity: normal Keywords: ux-feedback needs-patch
Cc: jane

Description

Issue

The default behaviour of the new 'Internal Linking' feature is to auto-insert the title attribute as a duplicate of the link text.

This is not best-practise and, contrary to some beliefs, doesn't actually aid accessibility.

Solution

The title field should be blank by default and only included if the uses enters data.

Why?

Title text is only useful when it is *different* to the actual link text AND provides additional information. Duplicating the link text in this fashion just adds fuzz to the page.

Change History (10)

  • Summary changed from Internal Linking behaviour in Editor / TinyMCE to Accessibility: Internal Linking behaviour in Editor / TinyMCE

comment:2   jane2 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Where are you seeing that? When I use internal linking it does not pre-fill the title field.

comment:3   jane2 years ago

  • Cc jane added
  • Milestone Awaiting Review deleted

If you click a post (as part of internal linking), the post title gets filled, but I'm really not sure what the report here is referring to.

  • Resolution worksforme deleted
  • Status changed from closed to reopened

When the Insert/edit link dialog box appears I see this:

Enter the destination URL
URL [ http:// ]
Title [       ]

I click on a post to link to eg. "Friday Travel Adventure", I get this:

URL [ http://mysite.com/friday-travel-adventure/ ]
Title [ Friday Travel Adventure ]

Auto-filling the title attribute with the exact (duplicate) content of the post name is the issue. The field should be left blank until the user enters useful information.

See also
http://www.456bereastreet.com/archive/200903/dont_duplicate_link_text_in_the_title_attribute/

http://www.w3.org/TR/WCAG20-TECHS/H33

comment:6   dd322 years ago

Auto-filling the title attribute with the exact (duplicate) content of the post name is the issue. The field should be left blank until the user enters useful information.

Correct me if I'm wrong here, But the only way to insert a link is to select some text (In this case, I selected "See what I said about myself") click the link button, Find a object to link to (In this case I linked to "About"), The result is that the Title attribute contains what the link is actually linking to which is in most cases going to be different from the selected text.

Of course, If the text you're linking is exactly the same as the page title of the page you want to link to, you'll get your experienced duplicate title.

comment:7 follow-up: ↓ 10   stencil2 years ago

@dd32 I understand the behaviour you mention, and yes it does differ from my 'issue' which is relating to text selected which matches the post title.

Sorry, perhaps this is trivial. I'm just not keen on automatically adding title attributes to every link. I imagine most users will leave the assigned title text because it's been filled in for them.

Perhaps a conditional in the JavaScript that if selection == post title don't auto fill the field?

  • Keywords ux-feedback needs-patch added
  • Milestone set to Awaiting Review
  • Type changed from defect (bug) to enhancement

Perhaps a conditional in the JavaScript that if selection == post title don't auto fill the field?

That would be an enhancement and I see no problem with this.

comment:10 in reply to: ↑ 7   lessbloat7 months ago

Replying to stencil:

Perhaps a conditional in the JavaScript that if selection == post title don't auto fill the field?

My 2 cents:

I understand your idea around preventing the link text from ever matching the link title, however, here are my concerns with your proposed solution:

1) In order to replicate this issue you've got to highlight text for a link (i.e. 'My trip to Africa') that also happens to be the same as the title of the post or page that you're linking to. If this does happen, just change the title attribute in the add link modal to something other than the link text (so you could change 'My trip to Africa' to 'Thoughts on my 6 months in Africa').

2) I don't think we can outright prevent people from making the link text the same as the link title. If they want to make it the same for whatever reason, they should be able to. For example, they may have a plugin that relies on the text of the link title in some way. They should be allowed to set it to whatever they want.

Note: See TracTickets for help on using tickets.