Index: trac/templates/attachment.html
===================================================================
--- trac/templates/attachment.html	(revision 9236)
+++ trac/templates/attachment.html	(working copy)
@@ -8,7 +8,13 @@
   <xi:include href="layout.html" />
   <xi:include href="macros.html" />
   <head>
-    <title>Attachment</title>
+    <title py:with="parent = attachments and attachments.parent or
+                             attachment.resource.parent"
+           py:choose="mode">
+             <py:when test="'new'">${name_of(parent)} - Attachment</py:when>
+             <py:when test="'list'">${name_of(parent)} - Attachments</py:when>
+             <py:otherwise>${attachment.filename + ' - ' + name_of(parent)} - Attachment</py:otherwise>
+    </title>
     <py:if test="preview">
       <script type="text/javascript" src="${chrome.htdocs_location}js/folding.js"></script>
       <script type="text/javascript">

