mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-06 10:30:31 +08:00
Adding `alt=""` to tell screenreaders to skip these, we don't reliably have alt content available for onebox images and they tend to be decorative, so better to omit. <img width="738" height="151" alt="learn.microsoft.com onebox with the link whats new in C# 11, there's a purple C# badge to the left of the link" src="https://github.com/user-attachments/assets/15bdc830-683f-4c69-a11b-9d54c66fa627" /> We already do this in some oneboxes, so this covers some more cases including the generic.
25 lines
931 B
Text
25 lines
931 B
Text
<aside class="onebox {{subname}}" data-onebox-src="{{link}}">
|
|
<header class="source">
|
|
{{#favicon}}
|
|
<img src="{{favicon}}" class="site-icon" alt=""/>
|
|
{{/favicon}}
|
|
|
|
{{#article_published_time}}
|
|
<a href="{{link}}" target="_blank" rel="noopener" title="{{article_published_time_title}}">{{domain}} – {{article_published_time}}</a>
|
|
{{/article_published_time}}
|
|
{{^article_published_time}}
|
|
<a href="{{link}}" target="_blank" rel="noopener">{{domain}}</a>
|
|
{{/article_published_time}}
|
|
</header>
|
|
|
|
<article class="onebox-body">
|
|
{{{view}}}
|
|
</article>
|
|
|
|
<div class="onebox-metadata">
|
|
{{#metadata_1_label}}<span style="float: left;">{{metadata_1_label}}: {{metadata_1_value}}</span>{{/metadata_1_label}}
|
|
{{#metadata_2_label}}<span style="float: right;">{{metadata_2_label}}: {{metadata_2_value}}</span>{{/metadata_2_label}}
|
|
</div>
|
|
|
|
<div style="clear: both"></div>
|
|
</aside>
|