浏览代码

Fixed #32860 -- Made docs permalinks focusable to improve accessibility.

Timothy McCurrach 3 年之前
父节点
当前提交
4659a790cf
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      docs/_theme/djangodocs/static/djangodocs.css

+ 3 - 2
docs/_theme/djangodocs/static/djangodocs.css

@@ -125,8 +125,9 @@ div.versionadded span.title, div.versionchanged span.title, span.versionmodified
 div.versionadded, div.versionchanged, div.deprecated { color:#555; }
 
 /*** p-links ***/
-a.headerlink { color: #c60f0f; font-size: 0.8em; padding: 0 4px 0 4px; text-decoration: none; visibility: hidden; }
-h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, h4:hover > a.headerlink, h5:hover > a.headerlink, h6:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; }
+a.headerlink { color: #c60f0f; font-size: 0.8em; margin-left: 4px; opacity: 0; text-decoration: none; }
+h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, h4:hover > a.headerlink, h5:hover > a.headerlink, h6:hover > a.headerlink, dt:hover > a.headerlink { opacity: 1; }
+a.headerlink:focus { opacity: 1; }
 
 /*** index ***/
 table.indextable td { text-align: left; vertical-align: top;}