Editor Link Behavior

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Editor Link Behavior

Eric Mann
Before I open a Trac ticket, I wanted to talk through a minor frustration I
have with the link tool to see if a) it's an issue others have and b) if
it's something worth changing.

When I'm writing a post, I often highlight text and want to use *that same
text* as the text for the link (which is used as alt text when the anchor
tag is rendered in markup). This is particularly relevant when I'm linking
to a book title, another article, or a person's name.

What I'd really like to see is the link text pre-populated with my
selection when the link modal opens.

Does this make sense to anyone else? Does it feel like a good idea? Should
I take some time to open a ticket and work on a patch?
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Editor Link Behavior

Otto-19
I find your question confusing. What is the ultimate markup you're looking
to end up with?

I ask because anchor tags (links) don't have alt text. Alt text goes on
images.

Now, anchor tags can have "title" attributes, but the title should not be
just a duplication of the anchor text (the stuff inside the <a></a>). The
anchor text should name the link, while the title should provide additional
information about it. They should never be the same.

So, what you have selected should be what text becomes the link. You should
select the anchor text. Which means that it naturally should not duplicate
that text anywhere else in the anchor tag's attributes, as I see it.

-Otto



On Fri, Oct 24, 2014 at 4:09 PM, Eric Mann <[hidden email]> wrote:

> Before I open a Trac ticket, I wanted to talk through a minor frustration I
> have with the link tool to see if a) it's an issue others have and b) if
> it's something worth changing.
>
> When I'm writing a post, I often highlight text and want to use *that same
> text* as the text for the link (which is used as alt text when the anchor
> tag is rendered in markup). This is particularly relevant when I'm linking
> to a book title, another article, or a person's name.
>
> What I'd really like to see is the link text pre-populated with my
> selection when the link modal opens.
>
> Does this make sense to anyone else? Does it feel like a good idea? Should
> I take some time to open a ticket and work on a patch?
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Editor Link Behavior

Helen Hou-Sandi-2
I get what Eric is talking about - we don't have a "link text" field in the
popup. We have a title field for the actual title attribute, which we
really need to get rid of (and not use for internal linking) because it
promotes bad accessibility practices. I think switching to a more typical
"link text" field would be much more sensible, and be able to insert a link
without first selecting text, which is quite nice for people who aren't
mouse users. Would be curious what a Trac search turns up.
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers