# 自 #42005 起，标签描述不再显示在标签页面之外的任何地方

**URL:** <https://meta.discourse.org/t/tag-descriptions-are-no-longer-shown-anywhere-outside-the-tag-page-since-42005/416733>\
**Category:** Bug\
**Created:** [2026 年11 月 6 日 16:12 UTC](https://meta.discourse.org/t/tag-descriptions-are-no-longer-shown-anywhere-outside-the-tag-page-since-42005/416733 "2026-11-06T16:12:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

作者： ![thoka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thoka/32/115652_2.png) [@thoka](https://meta.discourse.org/u/thoka)\
发布日期： [2026 年11 月 6 日 16:12 UTC](https://meta.discourse.org/t/tag-descriptions-are-no-longer-shown-anywhere-outside-the-tag-page-since-42005/416733/1 "2026-11-06T16:12:32Z")

</div>

claude 为某个案例编写了这份缺陷报告，我们刚刚为其编写了一个变通方案：

自 [#42005](https://github.com/discourse/discourse/pull/42005)（“A11Y: don’t use the title attribute for category and tag descriptions”，2026年7月）起，标签描述在主界面中已没有任何可见的位置。

**复现步骤**

1. 为标签添加描述，例如为标签 `KER` 添加描述 `Kreiselternrat`。
2. 打开 /latest、/categories、带有该标签的主题，或撰写器中的标签选择器。
3. 将鼠标悬停在标签上或使其获得焦点。

**预期结果：** 有一种可访问的方式可以阅读描述，正如此次更改之前一样（此前是通过 `title` 工具提示显示）。

**实际结果：** 什么都没有。描述仅在 /tag/ 和 /tags 页面显示。

**为何我认为这是一个缺陷，而不仅仅是一个设计选择**

该 PR 指出相关信息“已在‘关于此分类’主题、分类下拉菜单、分类标题中提供”。这对于分类是成立的。但对于标签则不然：没有“关于”主题，标签选择器行不显示该信息，主题列表也不显示。

数据仍然被发送到客户端并传递给渲染器，但渲染器直接忽略了它：

- `frontend/discourse/app/lib/render-tag.js` 中的 `defaultRenderTag` 接收 `params.description`（通过 `tags_descriptions` 在主题列表、主题标题、搜索中获取），但将其丢弃。
- `frontend/discourse/select-kit/components/tag-row.gjs` 将 `description=this.item.description` 传递给 `dDiscourseTag`，同样也被丢弃。

我同意使用 `title` 属性是不恰当的工具。PR 本身建议改用可访问的工具提示/切换提示（tooltip/toggletip）。Discourse 在 float-kit 中提供了 DTooltip，它支持鼠标悬停和键盘焦点。标签（以及标签选择器行）是否可以使用该组件，或许可以放在一个站点设置后面？

**变通方案** 供急需此功能的人使用：一个小型主题组件，使用 `api.replaceTagRenderer` 和 float-kit 工具提示服务，在鼠标悬停和键盘焦点时恰好实现此功能：[GitHub - thoka/discourse-tag-description-tooltip: Discourse theme component: show the tag description in a tooltip on hover and focus · GitHub](https://github.com/thoka/discourse-tag-description-tooltip)

---

<div class="post-metadata">

作者： ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
发布日期： [2026 年11 月 6 日 16:47 UTC](https://meta.discourse.org/t/tag-descriptions-are-no-longer-shown-anywhere-outside-the-tag-page-since-42005/416733/2 "2026-11-06T16:47:31Z")

</div>

这不是错误，至少按我们对错误的定义来看。通常我们认为错误是指未按预期运行的功能，而这些是有意更改。这种情况更多是用户体验问题。

> [@thoka](#):
>
> 主题列表没有显示它

相关信息在主题列表中可见，以每个人都能访问且以相同方式获取的形式呈现：

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/e/7/2e7a1f7f83dc7f4a3899e79374e5a9ce1b596906.png)

这_确实_更难找到，如果大家对提高描述可见性有广泛兴趣，那我们可以考虑作为一个功能请求。

我们还提供了 [Tag Banners](https://meta.discourse.org/t/tag-banners/124240) 组件，它会将描述放置在标签主题列表的横幅中。

标签的工具提示并不是我们能够良好实现的选项，因为它们存在与 title 属性类似的数据不对称问题……悬停工具提示在桌面端没问题，但在移动端不起作用，特别是考虑到标签通常是链接，点击激活已经被占用。
