[wp-trac] [WordPress Trac] #21221: Image title and alt attribute content should be texturized.
WordPress Trac
noreply at wordpress.org
Tue Jul 15 12:12:30 UTC 2025
#21221: Image title and alt attribute content should be texturized.
------------------------------------------------+---------------------
Reporter: stephdau | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Media | Version: 3.4.1
Severity: normal | Resolution:
Keywords: dev-feedback has-patch 2nd-opinion | Focuses:
------------------------------------------------+---------------------
Changes (by callumbw95):
* keywords: dev-feedback has-patch => dev-feedback has-patch 2nd-opinion
Comment:
Hey all,
I have done some digging here, and I am not sure what the benefit of
making this change would be? As already pointed out by @joedolson there is
no benefit to accessibility here, but I am also struggling to see the SEO
and UI/UX benefits?
In regards to SEO, search engines parse the `alt` text to understand image
content and are more concerned with the words and semantic meaning, as
opposed the typographic correctness of the punctuation. There is
absolutely no known SEO advantage to using curly/pretty quotes over
straight quotes in alt or title tags.
In regards to the UI/UX benefits this may make the front end look prettier
when a page fails to load and the alt tag has been texturized, but as we
are actively trying to avoid images failing to load, then this wouldn't
really show up that often. But to achieve this we may introduce more
issues as HTML attributes are themselves enclosed in straight quotes
(e.g., `alt="..."`). While modern browsers are incredibly resilient,
programmatically inserting different types of quotes inside the
attribute's value can introduce a layer of unnecessary complexity. But
also the purpose of an alt text is to be a clean, functional data string.
It is generally considered best practice is to keep the content of
attributes as simple and unambiguous as possible to ensure maximum
compatibility across all platforms and user agents. Therefore I suggest we
`close` this ticket, however it would be good to get a `2nd-opinion` here.
😃
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21221#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list