From 93e280c042a9708f238ba0f2227a42ee86d97b11 Mon Sep 17 00:00:00 2001 From: Sorawee Porncharoenwase Date: Thu, 1 Oct 2020 12:35:09 -0700 Subject: [PATCH] accessibility: replace with appropriate tags is a "non-conforming feature". It is "entirely obsolete, and must not be used by authors" as specified in https://www.w3.org/TR/html51/obsolete.html#elementdef-tt. This PR replaces with either or as suggested in the above recommendation. Practically, it improves accessibility of the page, allowing screen readers to understand the document more accurately. Note that both and are recognized in older browsers already, so this PR doesn't cause any incompatibility issue. --- .../scribblings/main/private/search.js | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/pkgs/racket-index/scribblings/main/private/search.js b/pkgs/racket-index/scribblings/main/private/search.js index e7c6f874fe..5606e0ed52 100644 --- a/pkgs/racket-index/scribblings/main/private/search.js +++ b/pkgs/racket-index/scribblings/main/private/search.js @@ -71,7 +71,7 @@ function MakeContextQueryItem(qry, desc) { +' onclick="return new_query(this,\'' +encodeURIComponent(desc) +'\');">' - + desc.replace(/{{/g, "").replace(/}}/g, "") + + desc.replace(/{{/g, "").replace(/}}/g, "") + ''; } @@ -112,34 +112,34 @@ function InitializeSearch() { +'' +'
' +'
    ' - +'
  • Hit PageUp/PageDown or' - +' C+Enter/S+C+Enter to scroll through the' - +' results.
  • ' + +'
  • Hit PageUp/PageDown or' + +' Ctrl+Enter / Shift+Ctrl+Enter' + +' to scroll through the results.
  • ' +'
  • Search terms are all required, use' - +' “N:str” to negate a term.' - +'
  • Use “M:str” to match only' + +' “N:str” to negate a term.' + +'
  • Use “M:str” to match only' +' identifiers from modules that (partially) match' - +' “str”; “M:” by' + +' “str”; “M:” by' +' itself will restrict results to bound names only.
  • ' - +'
  • Use “H:str” to match only' + +'
  • Use “H:str” to match only' +' modules that implement a language' - +' “#lang str”.
  • ' - +'
  • Use “R:str” to match only' + +' “#lang str”.
  • ' + +'
  • Use “R:str” to match only' +' modules that implement a reader module' - +' “#reader str”.
  • ' - +'
  • L:str” is similar to' - +' “M:str”, but' - +' “str” should match the module name' - +' exactly; “L:” by' + +' “#reader str”.
  • ' + +'
  • L:str” is similar to' + +' “M:str”, but' + +' “str” should match the module name' + +' exactly; “L:” by' +' itself will restrict results to module names only.
  • ' - +'
  • T:str” restricts results to ones in' - +' the “str” manual (naming the' + +'
  • T:str” restricts results to ones in' + +' the “str” manual (naming the' +' directory where the manual is found).
  • ' +'
  • Entries that correspond to bindings have module links that' +' create a query restricted to bindings in that module (using' - +' “L:”), other entries have similar links for' + +' “L:”), other entries have similar links for' +' restricting results to a specific manual (using' - +' “T:”); you can control whether manual links' + +' “T:”); you can control whether manual links' +' appear (and how) in the preferences.
  • ' +'
  • Right-clicking these links refines the current query instead of' +' changing it (but some browsers don\'t support this).
  • ' @@ -387,8 +387,8 @@ function SanitizeHTML(str) { .replace(/>/g, ">") .replace(/") - .replace(/}}/g, "
    "); + .replace(/{{/g, "") + .replace(/}}/g, ""); } function UrlToManual(url) { @@ -526,7 +526,7 @@ var indicators = : (j==i) ? "►" : "·"; } - a.push(" "+s+""); + a.push(" "+s+""); } return a; }());