Copilot commented on code in PR #2845:
URL: https://github.com/apache/tika/pull/2845#discussion_r3319659877


##########
docs/publish-docs.sh:
##########
@@ -40,12 +40,16 @@ mkdir -p "${DOCS_DIR}"
 
 # Strip the 'tika/' component dir prefix so URLs are /docs/X.Y.Z/...
 cp -r target/site/tika/* "${DOCS_DIR}/"
-# UI assets one level above docs/, since HTML uses ../../_/ relative paths
-cp -r target/site/_/ "${PUBLISH_DIR}/_/"
+# UI assets one level above docs/, since HTML uses ../../_/ relative paths.
+# Replace wholesale: cp -r into an existing directory nests source as a
+# subdirectory (publish/_/_/), so remove first to keep the layout flat.
+rm -rf "${PUBLISH_DIR}/_"
+cp -r target/site/_ "${PUBLISH_DIR}/_"

Review Comment:
   `rm -rf "${PUBLISH_DIR}/_"` makes the script more dangerous if `PUBLISH_DIR` 
is accidentally set incorrectly (e.g., `/` or an unexpected checkout). Consider 
adding a safety check (e.g., verify `PUBLISH_DIR` exists and looks like a 
tika-site `publish/` dir) before removing, or refuse to run when `PUBLISH_DIR` 
is too short / equals `/`.



##########
docs/supplemental-ui/partials/header-content.hbs:
##########
@@ -5,22 +5,21 @@
         <img src="{{{uiRootPath}}}/img/ASF_Tika-colour.svg" alt="Apache Tika" 
style="height: 2rem; margin-right: 0.5rem; background: white; padding: 2px 4px; 
border-radius: 3px;">
         {{site.title}}
       </a>
-      <button class="navbar-burger" aria-label="Toggle navigation" 
data-target="topbar-nav">
+      {{#if env.SITE_SEARCH_PROVIDER}}
+      <div class="navbar-item search hide-for-print">
+        <div id="search-field" class="field">
+          <input id="search-input" type="text" placeholder="Search the 
docs"{{#if page.home}} autofocus{{/if}}>

Review Comment:
   The new search input is missing an accessible label. Placeholders aren’t a 
substitute for labels, so screen readers may announce this as an unlabeled edit 
field. Consider adding an associated <label> (visually hidden if needed) and/or 
an `aria-label` (and optionally `type="search"` / `role="search"`).
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to