[wp-trac] [WordPress Trac] #58416: Media Title field should soft wrap in Media Modal: For better readability/editing of long titles.
WordPress Trac
noreply at wordpress.org
Wed Jun 7 17:55:19 UTC 2023
#58416: Media Title field should soft wrap in Media Modal: For better
readability/editing of long titles.
-------------------------------------------------+-------------------------
Reporter: abitofmind | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Media | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch has-screenshots has- | Focuses:
testing-info needs-testing needs-unit-tests | administration
-------------------------------------------------+-------------------------
Comment (by abitofmind):
@joedolson Could you please answer the questions from the annotated
screenshots? Again here:
1) In the Media Modal the ALT Text textarea allows linebreaks client side,
and even restores them when re-opening that media file later.
a) Where/how are those linebreak persisted? In the database only? Or is
the browser's localstorage? Or is my web browser's web form autofilling
playing me an illusion here? (I don't think so, but have not investigated
it either).
b) Is the ALT Text textarea in the other UIs/contexts (Image Insertion
Dialog in Block Editor + Inspector Panel in Block Editor) showing the data
as-is (they landed in the database sanitized without linebreaks) or is a
runtime linebreak to whitespace transformation happening?
@ all
2) Allowing linebreaks client side in the ALT Text, is a good UX for
structuring long text onto multiple lines. As I wrote in the screenshot
annotation.
a) Question: If the text is `One\n\nTwo\n\nThree` client side how is this
persisted? As is? Or with `\n+` being transformed to a uniform singular
whitespace? Again If I get an answer to 1a) I would have fewer
speculative followup questions.
b) UX discussion: For the "Media Title" which anyhow is only for internal
use (browsing/searching your library) and does not make it into the
frontend output (for many versions now). Media Titles can be a bit longer
too. But by tendency they are less long than an Alt Text (if it indeed
gives a full/rich visual description). It seems more correct to disallow
linebreaks also client side, to more explicitly communicate to the user
"this is a title, which serves for lookups (almost a unique identifier),
and which is a single line only" potentially with a length limited lower
to than what's allowed for the alt text (I dunno).
TL;DR: So disallowing manual linebreaks but allowing soft wrapping seems
to be the right look & feel for the ALT Text textarea.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58416#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list