RESOLVED FIXED 277889
Add `-webkit-` prefix for text-decoration in UA stylesheet for <abbr> and <acronym> with title
https://bugs.webkit.org/show_bug.cgi?id=277889
Summary Add `-webkit-` prefix for text-decoration in UA stylesheet for <abbr> and <ac...
atjn
Reported 2024-08-09 16:51:47 PDT
An <abbr> element like this: <abbr title="Hyper Text Markup Language">HTML</abbr> ..is supposed to have a dotted underline to make it clear that you can hover over it to read the title. This is recommended in the HTML spec: https://html.spec.whatwg.org/multipage/rendering.html#phrasing-content-3 The recommended CSS declaration is: abbr[title], acronym[title] { text-decoration: dotted underline; } Both Chrome and Firefox follow the spec. Safari does not follow the spec, no underline is rendered. It would be nice if Safari could add this declaration so we can ensure a consistent user experience :)
Attachments
With Local Fix (-webkit- added) on Minibrowser (135.84 KB, image/png)
2024-08-10 06:52 PDT, Ahmad Saleem
no flags
Ahmad Saleem
Comment 1 2024-08-09 20:03:58 PDT
Safari / WebKit has it with test coverage as well: https://searchfox.org/wubkat/rev/b36cbce69fddb7da33823f316bd8ead5bebee970/Source/WebCore/css/html.css but it seems that it is regressed some how or we are failing it even in Safari 17.6.1. Thanks for flagging, I will see when it regressed.
Radar WebKit Bug Importer
Comment 2 2024-08-09 20:04:06 PDT
Ahmad Saleem
Comment 3 2024-08-09 20:06:58 PDT
https://searchfox.org/wubkat/rev/b36cbce69fddb7da33823f316bd8ead5bebee970/Source/WebCore/css/html.css#114 abbr[title], acronym[title] { text-decoration: dotted underline; } added in: 254710@main
Ahmad Saleem
Comment 4 2024-08-09 20:09:23 PDT
Just to flag - it is regression of text-decoration: dotted underline - not working at all. It does not work even in simple: https://jsfiddle.net/oa2zcu14/ <p>Test</p> p { text-decoration: dotted underline; } as well.
atjn
Comment 5 2024-08-10 04:19:08 PDT
Oh wow, it had not occured to me that the CSS feature itself could be broken. Thanks for the quick triage, looking forward to a fix :)
Ahmad Saleem
Comment 6 2024-08-10 06:34:54 PDT
OK - we don't support un-prefixed yet. So I need to update my fix rather than do anything else. https://bugs.webkit.org/show_bug.cgi?id=230083 - deals with un-prefixing it. It is not regression but never worked when I added.
Ahmad Saleem
Comment 7 2024-08-10 06:49:28 PDT
Locally this fixes it - so I did this draft PR to see, if it has any fallout - https://github.com/WebKit/WebKit/pull/31993
Ahmad Saleem
Comment 8 2024-08-10 06:52:29 PDT
Created attachment 472112 [details] With Local Fix (-webkit- added) on Minibrowser Local Fix showing that adding -webkit- fixes it.
EWS
Comment 9 2024-09-09 16:20:21 PDT
Committed 283368@main (1d7ae3d9446e): <https://commits.webkit.org/283368@main> Reviewed commits have been landed. Closing PR #31993 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.